[Webkit-unassigned] [Bug 74815] Non-BMP Unicode character codes aren't properly unescaped in CSS

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 12 10:46:55 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=74815





--- Comment #8 from Mathias Bynens <mathias at qiwi.be>  2012-01-12 10:46:55 PST ---
(In reply to comment #4)
> This is specifically an issue with parsing strings like '\01f3a4'. It will work if you just paste a Unicode character in your CSS (and add a @charset rule to make sure it's decoded correctly).
> 
> I don't know if we're matching the spec or not here.

FWIW, the spec is here: http://www.w3.org/TR/CSS21/syndata.html#characters / http://www.w3.org/TR/css3-syntax/#characters

It doesn’t mention anything about UTF-16 or surrogate pairs in escapes (which are thus non-standard, although they happen to be supported in WebKit); only Unicode / ISO 10646 code points are allowed in CSS escape sequences. This kind of CSS escape sequence doesn’t work in WebKit for characters outside the BMP, which is what this bug is about. For more info, see this mailing list discussion: http://lists.w3.org/Archives/Public/www-style/2012Jan/thread.html#msg536

For example, `\1d306 ` or `\01d306` are supposed to be CSS escape sequences for the “tetragram for centre” symbol (U+1D306), but they currently don’t work in WebKit.

(In reply to comment #5)
> Created an attachment (id=120122)
 --> (https://bugs.webkit.org/attachment.cgi?id=120122&action=review) [details]
> reduced test case

I’m not sure how that test case helps, as it doesn’t contain a CSS escape sequence, just the literal character. Am I missing something?

Here’s an appropriate test case: http://jsfiddle.net/mathias/jY7ra/ The first escape sequence (used with `html:before`) is the standard one. WebKit is the only engine this fails in.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list