-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
<script>'s language attribute is not whitespace-stripped in actual implementations #7923
Comments
Nice find! Willing to create a PR for this? |
I'm not following those tests. It shows both of these passing for all four browsers: But according to the steps you listed these should both have a |
Sure, I'll create a PR later when I have time. @Yay295 Right, the WPT's expectation doesn't match with the current spec, and instead matches with the proposed change here. |
Memo: I'll wait for #7876 to land before creating a PR to avoid conflicts. |
@hiroshige-g ready to create a PR for this? |
This matches implementations, which only whitespace-strip the type="" attribute. Closes #7923.
A minor issue:
In the current spec, script language attributes with valid value + trailing whitespaces would be executed, e.g.
<script language="javascript ">
,the script block's type string
would be"text/javascript "
"text/javascript"
but this whitespace stripping is not performed on Safari/Firefox/Chrome, according to https://wpt.fyi/results/html/semantics/scripting-1/the-script-element/script-type-and-language-js.html.
I think it's better to modify the spec to align with the implementations, like:
with leading and trailing ASCII whitespace strippedis a JavaScript MIME type essence match, the script's type is "classic".The text was updated successfully, but these errors were encountered: