css
css copied to clipboard
Parser does not properly emit bad-string tokens
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
@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 ... */
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.