Parsing error with escaped characters. #97

Closed
JimBobSquarePants opened this Issue Jun 30, 2011 · 3 comments

3 participants

@JimBobSquarePants

Hi there,

I'm getting a lot of parsing errors when escaping special characters in css selectors.

This seems to be conflicting with the rules set here http://www.w3.org/TR/CSS21/syndata.html#characters

For example:

/* Code for rating sprites.*/

.rating, .r0\.0
{
    background: url("img/ratings/rating_sprite.gif") 0 0;
}

.r0\.5
{
    background-position: 0 -15px;
}

This will cause an 18 errors even though it appears to be perfectly acceptable within the spec.

Keep up the good work. This stuff is brilliant!

@mahonnaise

More escape stuff:

http://mathiasbynens.be/notes/html5-id-class#css

This should help to write some tests.

@nzakas

Ew, yeah, that's nasty. I remember punting on that with the parser because it got hairy. Will likely take me a while to fix.

@nzakas nzakas pushed a commit that closed this issue Jul 13, 2011
Nicholas C. Zakas Updated parser to deal with CSS escaping (fixes #97) 93c4ac2
@nzakas nzakas closed this in 93c4ac2 Jul 13, 2011
@JimBobSquarePants

Whoop!
That was fast. Look forward to testing it on the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment