CSS parser accepts "@namespace url(x" -- missing close paren at EOF

RESOLVED INVALID

Status

()

--
minor
RESOLVED INVALID
10 years ago
10 years ago

People

(Reporter: jruderman, Unassigned)

Tracking

({testcase})

Trunk
x86
macOS
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

10 years ago
Created attachment 358679 [details]
testcase

Firefox's CSS parser doesn't mind the missing ")" as long as there's an EOF right there:

  @namespace url(x

is accepted and turned into

  @namespace url(x);

(I'm just guessing this is a bug.  Safari and Opera don't seem to support .cssRules for @namespace, so it's hard for me to tell what they do.)
(Reporter)

Comment 1

10 years ago
Created attachment 358680 [details]
testcase 2

Similarly, Firefox seems fine with an unclosed quote at the end of the file:

@namespace '
(Reporter)

Comment 2

10 years ago
I found this more through accident than through fuzzing.  If this is a bug, I can have the fuzzer test for some invariant like "adding \n at the end shouldn't affect the result of parsing" to look for more bugs like it.
We're supposed to be ok with these, I think, although it's a relatively recent change in the spec.
You need to log in before you can comment on or make changes to this bug.