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

MinifyHtmlAttribute doesn't minify <script type="text/html"> #11

Closed
JoshuaKGoldberg opened this issue Jul 15, 2016 · 2 comments
Closed

Comments

@JoshuaKGoldberg
Copy link

JoshuaKGoldberg commented Jul 15, 2016

Bug report

Expected behavior: HTML contents of scripts of type text/html should be minified.

Actual behavior: No minification happens.

As per the HTML5 spec, it's valid to have "text/html" as a script tag's content.

The type attribute gives the language of the script or format of the data. If the attribute is present, its value must be a valid MIME type. The charset parameter must not be specified. The default, which is used if the attribute is absent, is "text/javascript".

This is used in some sites, such as sway.com (search for type="text/html"> in the source).

@Taritsyn
Copy link
Owner

Hello, Joshua!

Set to ProcessableScriptTypeList property the value equal to "text/html" (see “HTML Minifier” section of the documentation).

@JoshuaKGoldberg
Copy link
Author

Thanks for the info! I'll close this and file a new issue for a more specific use case if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants