Skip to content
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

Don't modify script nodes with text/html type #1924

Merged
merged 1 commit into from Sep 22, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/assets/HTMLAsset.js
Expand Up @@ -64,7 +64,8 @@ const META = {
const SCRIPT_TYPES = {
'application/javascript': 'js',
'text/javascript': 'js',
'application/json': false
'application/json': false,
'text/html': false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should change it to a whitelist instead of a blacklist? Basically, just application/javascript and text/javascript, or if the type attribute is not specified. We could also enable typescript, coffeescript, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense. In the case of no type attribute you would like to keep existing behavior and default to JS? Wondering if this will be a breaking change for existing users.

};

// Options to be passed to `addURLDependency` for certain tags + attributes
Expand Down