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

Parser does not properly emit bad-string tokens #12

Open
riking opened this issue Mar 12, 2018 · 1 comment
Open

Parser does not properly emit bad-string tokens #12

riking opened this issue Mar 12, 2018 · 1 comment
Labels

Comments

@riking
Copy link

riking commented Mar 12, 2018

The "consume an at-rule" algorithm says that the following should result in an at-rule with a prelude of title 56 56 Who's this d****e? and no block, but instead enters an "unclosed q" error state.

https://www.w3.org/TR/css-syntax-3/#consume-an-at-rule

Real world example: https://mspfa.com/?s=21504&p=2 (added to a <style> element dynamically, CSS is in the .y field obtained from POST mspfa.com do=story&s=21504)

@mspfa title 1 1 Fanventure START!!;
/*                   vvv Unmatched quote */
@mspfa title 56 56 Who's this d****e?; @mspfa title 62 64 ???;
@mspfa title 131 131 Troll time. @mspfa title 194 194 What is this, Rick and Morty eyes?;
/* ... custom at-rules continue ... */

.p436 #content div {
    background-color: #FFFFFF;
    border: 4px solid #009933;
    padding: 15px 25px;
    box-shadow: 4px 4px #005500;
}

/* ... normal CSS rules continue ... */
@riking
Copy link
Author

riking commented Mar 12, 2018

update: after sending it through https://rawgit.com/tabatkins/parse-css/master/example.html I see that it does indeed emit a BAD-STRING, terminating at the newline.

It would be nice to get the actual BAD-STRING token.

@riking riking changed the title Parser chokes on custom at-rules with unbalanced quotes Parser does not properly emit bad-string tokens Mar 12, 2018
@coreydaley coreydaley added the bug label Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants