Unicode null character displayed as 0000

RESOLVED INVALID

Status

()

Core
CSS Parsing and Computation
RESOLVED INVALID
9 years ago
9 years ago

People

(Reporter: cesar, Unassigned)

Tracking

({regression, testcase})

Trunk
x86
Linux
regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
Created attachment 344837 [details]
Unicode null and double-angle mark

Unicode null properly escaped appears as 0000 when rendered on an HTML page. This seemed to pop up recently. null was ignored in Firefox 2, and worked on Sept 12 (sorry, that's my most recent compile build).

This is closely related to bug 204324. Though, it doesn't seem to happen to other unicode characters such as \00BB. Attached a html page to show the example.

Comment 1

9 years ago
The testcase works on 1023, fails with the 1024 nightly here.
regressed from bug 228856 ?

Updated

9 years ago
Keywords: regression, testcase
(In reply to comment #0)
> Unicode null properly escaped appears as 0000 when rendered on an HTML page.

CSS 2.1 says you cannot use a \-escape to encode the character with code point zero, and leaves the behavior undefined if you try it.  Gecko used to completely ignore \0 (with however many zeros) but this was deemed inappropriate because it meant someone could (potentially) sneak malicious CSS past a filter by sticking \0 in the middle of a property name.  That was bug 228856.

I'm inclined to mark this bug INVALID, but first I would like to know what you were trying to accomplish with \0 in CSS.  There may be a better way to do what you want.
(Reporter)

Comment 3

9 years ago
(In reply to comment #2)
> I'm inclined to mark this bug INVALID, but first I would like to know what you
> were trying to accomplish with \0 in CSS.  There may be a better way to do what
> you want.

It's fine to mark it invalid. There is an AMO editor tool to view addon source, and it uses \0000 in a CSS file similar to the testcase. It worked before, so when I noticed the changed, I wasn't sure if we regressed or if it was a bug fix.

Thanks. I'll file a new AMO bug.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.