Skip to content

proposal of 'allow listing' as an inclusive alternative to 'whitelisting' #956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 24, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/guide/migration/custom-elements-interop.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ badges:

## Overview

- **BREAKING:** Custom elements whitelisting is now performed during template compilation, and should be configured via compiler options instead of runtime config.
- **BREAKING:** Custom elements allow listing is now performed during template compilation, and should be configured via compiler options instead of runtime config.
- **BREAKING:** Special `is` prop usage is restricted to the reserved `<component>` tag only.
- **NEW:** There is new `v-is` directive to support 2.x use cases where `is` was used on native elements to work around native HTML parsing restrictions.

Expand All @@ -21,7 +21,7 @@ If we want to add a custom element defined outside of Vue (e.g. using the Web Co

### 2.x Syntax

In Vue 2.x, whitelisting tags as custom elements was done via `Vue.config.ignoredElements`:
In Vue 2.x, allow listing tags as custom elements was done via `Vue.config.ignoredElements`:

```js
// This will make Vue ignore custom element defined outside of Vue
Expand Down
2 changes: 1 addition & 1 deletion src/guide/migration/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ The following consists a list of breaking changes from 2.x:

### Custom Elements

- [Custom elements whitelisting is now performed during template compilation](/guide/migration/custom-elements-interop.html)
- [Custom elements allow listing is now performed during template compilation](/guide/migration/custom-elements-interop.html)
- [Special `is` prop usage is restricted to the reserved `<component>` tag only](/guide/migration/custom-elements-interop.html#customized-built-in-elements)

### Other Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion src/guide/template-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,4 +206,4 @@ Unless you have a "someattr" property in your instance, your code won't work.

#### JavaScript Expressions

Template expressions are sandboxed and only have access to a [whitelist of globals](https://github.com/vuejs/vue-next/blob/master/packages/shared/src/globalsWhitelist.ts#L3) such as `Math` and `Date`. You should not attempt to access user defined globals in template expressions.
Template expressions are sandboxed and only have access to a [allowlist of globals](https://github.com/vuejs/vue-next/blob/master/packages/shared/src/globalsWhitelist.ts#L3) such as `Math` and `Date`. You should not attempt to access user defined globals in template expressions.