-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Could not parse CSS Stylesheet, when inline style tag font-family has space #2123
Comments
This probably regressed in 11.6.0 due to our parsing changes. IIRC parse5 feeds us new text nodes if there is a space. We probably need to do something similar to what we do for script elements. I'll try to fix/hack around soon. |
This was referenced Jan 24, 2018
domenic
added a commit
that referenced
this issue
Jan 27, 2018
This replaces our previous hacky <script>-only close tag detection, which only worked in non-empty <script> cases, with a more general hacky version that works for all elements, including empty elements, by monkeypatching parse5. (Eventually inikulin/parse5#237 should give us a better solution, but for now we lock our parse5 version and monkeypatch it.) In particular, this allows us to not parse stylesheets before their close tag is encountered, which fixes #2123 and fixes #2131.
domenic
added a commit
that referenced
this issue
Jan 28, 2018
This replaces our previous hacky <script>-only close tag detection, which only worked in non-empty <script> cases, with a more general hacky version that works for all elements, including empty elements, by monkeypatching parse5. (Eventually inikulin/parse5#237 should give us a better solution, but for now we lock our parse5 version and monkeypatch it.) In particular, this allows us to not parse stylesheets before their close tag is encountered, which fixes #2123 and fixes #2131.
domenic
added a commit
that referenced
this issue
Jan 29, 2018
This replaces our previous hacky <script>-only close tag detection, which only worked in non-empty <script> cases, with a more general hacky version that works for all elements, including empty elements, by monkeypatching parse5. (Eventually inikulin/parse5#237 should give us a better solution, but for now we lock our parse5 version and monkeypatch it.) In particular, this allows us to not parse stylesheets before their close tag is encountered, which fixes #2123 and fixes #2131.
domenic
added a commit
that referenced
this issue
Jan 30, 2018
This replaces our previous hacky <script>-only close tag detection, which only worked in non-empty <script> cases, with a more general hacky version that works for all elements, including empty elements, by monkeypatching parse5. (Eventually inikulin/parse5#237 should give us a better solution, but for now we lock our parse5 version and monkeypatch it.) In particular, this allows us to not parse stylesheets before their close tag is encountered, which fixes #2123 and fixes #2131.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At first I was blaming this on CSSOM, but after some digging it seems like the(seems to be how the parser works)content
passed to CSSOM here is not complete.Basic info:
Minimal reproduction case
Output:
How does similar code behave in browsers?
The HTML works fine in browsers, and sets the font properly: https://jsfiddle.net/tveprk11/
Removing the space from
"Helvetica Neue"
allows the code to run without errors.The text was updated successfully, but these errors were encountered: