Closed
Bug 541434
Opened 15 years ago
Closed 15 years ago
incorrect parsing of invalid url() containing { or [ before what makes it invalid
Categories
(Core :: CSS Parsing and Computation, defect, P4)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a1
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
Attachments
(1 file)
8.55 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
The comment I added in http://hg.mozilla.org/mozilla-central/rev/a3cda2dce88e to nsCSSParser::GetURLInParens that pushing aURL back into the buffer is unnecessary actually turns out to be wrong; yesterday I wrote a testcase in which it does make a difference:
background: url({"")})
This is not a valid URI token according to the spec, and therefore brace-matching applies. (brace-matching doesn't apply in a URI token, since {} and [] are allowed inside it.)
Assignee | ||
Comment 1•15 years ago
|
||
A bit ugly, but substantially less so than adding the ability to push buffers back into the tokenizer just for this, I think.
Attachment #423018 -
Flags: review?(bzbarsky)
Updated•15 years ago
|
Attachment #423018 -
Flags: review?(bzbarsky) → review+
Comment 2•15 years ago
|
||
You have the patch the wrong way around for the test case.
I should really get off my butt and revamp the invalid-url-token proposal as fantasai asked last month.
Assignee | ||
Comment 3•15 years ago
|
||
(In reply to comment #2)
> You have the patch the wrong way around for the test case.
No, it's removing an extra copy of the test (which is added in a different patch) that has the one failing test commented out so that the rest of the tests are still tested.
Assignee | ||
Comment 4•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Priority: -- → P4
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Assignee | ||
Updated•15 years ago
|
Flags: in-testsuite+
Comment 5•15 years ago
|
||
(In reply to comment #4)
> http://hg.mozilla.org/mozilla-central/rev/0ff87d9d2d73
Is this worth a backport to 1.9.2, and/or would it be too much trouble to do so?
I just personally helped someone who I think was bitten by this...(http://callek.pastebin.mozilla.org/699525)
Had the whole stylesheet (after this rule) missed. the Error console (at EOF) complained about invalid |background| definition, followed by unable to find a |}| before EOF.
User claimed it worked fine in 3.5.x (he even tested seconds before fixing his CSS in question)
Comment 6•15 years ago
|
||
(In reply to comment #5)
Erm actually; I should read the bug, patch and summary before commenting; or rather just not comment when I'm overtired; please ignore my last here.
Assignee | ||
Comment 7•14 years ago
|
||
I reverted this change in bug 569646 based on the working group's decision at yesterday's teleconference. See that bug for more details.
You need to log in
before you can comment on or make changes to this bug.
Description
•