Closed Bug 216293 Opened 21 years ago Closed 21 years ago

CSS classnames with encoded special characters don't work

Categories

(Core :: CSS Parsing and Computation, defect)

Other Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: burnus, Assigned: dbaron)

References

()

Details

I want to have e.g. a class named "a®name" reading the CSS2 spec this seems to
be allowed (http://www.w3.org/TR/CSS2/syndata.html#q4).

In the CSS file I can but it as a\0000AEname which validates (W3 CSS validator)
(using \000020 does not validate, I wonder why).

In the HTML file I tried a%AEname which according to Hixie (bug#207044
comment#7) should do it.
The less likely method of using "a\AE name" or "a\0000AEname" do not work
either. For the first one I would expect that matches "name" (it does) while for
the second one, I don't know -- but I didn't expect that it also matches "name".
(See testcase.)

PS: This is with Mozilla 1.2.1.
Our behavior on the testcase provided is correct.  For the contents of the HTML
class attribute, you have to use escaping mechanisms that work in HTML, i.e.,
character entities (or using a character encoding that contains the characters
you want).
Status: UNCONFIRMED → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
character entities or numeric character references, that is.

See http://dbaron.org/css/test/parsing3 for some examples of correct use of
character escapes.
You need to log in before you can comment on or make changes to this bug.