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
<style type>/<script type> and MIME type parameters #3022
Comments
(Note that valid parameters, such as |
This also applies to |
(Somewhat related to ongoing research over at whatwg/mimesniff#30.) |
I'm pretty sure for script at least the spec requires them not to be present or else it's treated as a data block. Definitely will be good to add tests. |
It doesn't really. It says "MIME type" and "valid MIME type", both of which include parameters as far as I can tell. So there's all sorts of problems here for sure. |
Ah, but the processing model does call for an ASCII case-insensitive match of a JavaScript MIME type, so we got that going for us. |
and then in the definition of JavaScript MIME type,
We could do some cleanup to make things clearer, but I think at least from the processing model side, we're covered. |
Yeah, and for |
Firefox bug for |
I can work on the spec side of this for script and also style de-genericization today. |
* De-genericizes <style> and <link rel="stylesheet"> to only deal with CSS. Fixes #2995. * Makes type="" on <style> "obsolete but conforming", since it is always redundant. * Makes type="(a JS MIME type)" on <script> obsolete but conforming as well. Previously we had a "should" requirement but had not recorded it in the centralized obsolete-but-conforming section that collects such requirements. * Makes <style> operate on child text content. Fixes #2996. * Adds pointers to #2997. * Makes it clearer that parameters are not allowed in the content type value for script or style. Fixes #3022.
* De-genericizes <style> and <link rel="stylesheet"> to only deal with CSS. Fixes #2995. * Makes type="" on <style> "obsolete but conforming", since it is always redundant. * Makes type="(a JS MIME type)" on <script> obsolete but conforming as well. Previously we had a "should" requirement but had not recorded it in the centralized obsolete-but-conforming section that collects such requirements. * Makes <style> operate on child text content. Fixes #2996. * Replaces the conformance requirement (noted in the source as "temporary") prohibiting unmatched comment-like syntax inside <style> with a conformance requirement to be valid CSS. * Adds pointers to #2997. * Makes it clearer that parameters are not allowed in the content type value for script or style. Fixes #3022.
Updated the Firefox bug to also cover |
* De-genericizes <style> and <link rel="stylesheet"> to only deal with CSS. Fixes #2995. * Makes type="" on <style> "obsolete but conforming", since it is always redundant. * Makes type="(a JS MIME type)" on <script> obsolete but conforming as well. Previously we had a "should" requirement but had not recorded it in the centralized obsolete-but-conforming section that collects such requirements. * Makes <style> operate on child text content. Fixes #2996. * Replaces the conformance requirement (noted in the source as "temporary") prohibiting unmatched comment-like syntax inside <style> with a conformance requirement to be valid CSS. * Adds pointers to #2997. * Makes it clearer that parameters are not allowed in the content type value for script or style. Fixes #3022.
* De-genericizes <style> and <link rel="stylesheet"> to only deal with CSS. Fixes whatwg#2995. * Makes type="" on <style> "obsolete but conforming", since it is always redundant. * Makes type="(a JS MIME type)" on <script> obsolete but conforming as well. Previously we had a "should" requirement but had not recorded it in the centralized obsolete-but-conforming section that collects such requirements. * Makes <style> operate on child text content. Fixes whatwg#2996. * Replaces the conformance requirement (noted in the source as "temporary") prohibiting unmatched comment-like syntax inside <style> with a conformance requirement to be valid CSS. * Adds pointers to whatwg#2997. * Makes it clearer that parameters are not allowed in the content type value for script or style. Fixes whatwg#3022.
Firefox ignores them, Chrome and Safari require them to not be present. I vastly prefer Chrome and Safari behavior as that allows for just string matching here.
Live DOM Viewer test:
<script type=text/javascript;x>w(1)</script>
.The text was updated successfully, but these errors were encountered: