NEW 54838
\* (backslash escaping of asterisk) fails to cancel its special CSS meanings
https://bugs.webkit.org/show_bug.cgi?id=54838
Summary \* (backslash escaping of asterisk) fails to cancel its special CSS meanings
Leif Halvard Silli
Reported 2011-02-20 16:19:07 PST
Created attachment 83107 [details] Test case document for backslash escaped asterisk in type selectors and namespace component In Webkit, \* (backslash escaping of the asterisk) in selectors fails to work in type selectors and in the namespace component (but works in other simple selectors such as attribute selectors). These errors occur both for hexadecimal as well as for plain backslash escaping. Since it is both a namespace component releated issue and a type selector/universal selector related issues, this bug can thus be split in two sub issues: (1) Webkit incorrectly treats *{} and \*{} the same. (2) Webkit incorrectly treats *|foo{} and \*|foo{} the same. First, the Universal/Type selector related error: (1) *{/* Universal-selector http://www.w3.org/TR/css3-selectors/#universal-selector */} \*{/* Type selector http://www.w3.org/TR/css3-selectors/#type-selectors */} Explanation: When the * in *{} is escaped to \*{} or to \00002a {}, then it isn't the universal selector anymore. (About cancelling of specal CSS meaning, see http://www.w3.org/TR/CSS21/syndata.html#characters ) When *{} is escaped, it becoms what the CSS3 selectors draft refers to as a 'type selector'. The \*{} cannot select anything, however - the same way that \-{} cannot select anything because no elements can begin with the '-' or with the '*'.) Webkit's error is that the \*{} selects the same thing that *{} slects. Webkit is alone about this error. Second, the namespace compoonent related bug: (2)  *|foo{/* Foo selector in the asterisk prefixed namespace.*/} \*|foo{/* Foo selector in any namespace, including no namespace*/} Because Webkit treats \*|foo{} identical to *|foo{}, it becomes impossible to create an asterisk prefiksed namespace in contrast to the 'any namespace' that *| otherwise represents. (An asterisk prefixed namespace \*| would be a single namespace, whereas *| represents any namespace including no namespace.)
Attachments
Test case document for backslash escaped asterisk in type selectors and namespace component (2.85 KB, application/xhtml+xml)
2011-02-20 16:19 PST, Leif Halvard Silli
no flags
Leif Halvard Silli
Comment 1 2011-02-20 16:24:22 PST
(In reply to comment #0) Sorry, a typo! Please read this: > *|foo{/* Foo selector in the asterisk prefixed namespace.*/} >\*|foo{/* Foo selector in any namespace, including no namespace*/} like this: *|foo{/* Foo selector in any namespace, including no namespace*/} \*|foo{/* Foo selector in the asterisk prefixed namespace. */}
Alexey Proskuryakov
Comment 2 2011-02-21 15:51:11 PST
See also: bug 21472.
Brent Fulgham
Comment 3 2022-07-12 14:20:27 PDT
Firefox passes all tests. Chrome fails the last two. Safari fails 4/6 tests.
Radar WebKit Bug Importer
Comment 4 2022-07-12 14:20:39 PDT
Anne van Kesteren
Comment 5 2023-08-27 23:47:09 PDT
https://github.com/w3c/csswg-drafts/issues/8911 needs to be resolved first I think.
Note You need to log in before you can comment on or make changes to this bug.