Closed Bug 478160 Opened 15 years ago Closed 15 years ago

@namespace 'a b' results in serialization weirdness

Categories

(Core :: CSS Parsing and Computation, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.2a1

People

(Reporter: jruderman, Assigned: dbaron)

References

Details

(Keywords: testcase)

Attachments

(3 files)

      No description provided.
Yeah, we probably need to put quotes around the contents of the url().
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
OS: Mac OS X → All
Hardware: x86 → All
I have patches for this in my queue (two of them, though there's really more that needs to be done, although that's probably covered by other bugs), but I need to write tests for them at some later point.

(My queue is at http://hg.mozilla.org/users/dbaron_mozilla.com/patches/ , and the patches are escape-string-should-append and quote-and-escape-url .)
This simplifies a lot of callers of this function, including future ones (I'm going to add more, and not only in this bug).
Attachment #365614 - Flags: superreview?(bzbarsky)
Attachment #365614 - Flags: review?(bzbarsky)
Attachment #365614 - Flags: superreview?(bzbarsky)
Attachment #365614 - Flags: superreview+
Attachment #365614 - Flags: review?(bzbarsky)
Attachment #365614 - Flags: review+
Attachment #365615 - Flags: superreview?(bzbarsky)
Attachment #365615 - Flags: superreview+
Attachment #365615 - Flags: review?(bzbarsky)
Attachment #365615 - Flags: review+
Comment on attachment 365615 [details] [diff] [review]
patch 2: serialize all url() in quoted form, and escape the strings properly

> nsROCSSPrimitiveValue::GetEscapedURI(nsIURI *aURI, PRUnichar **aReturn)
>+  // XXX Should this reuse nsStyleUtil::AppendEscapedCSSString?

Please.  And get rid of this function altogether.

r+sr=bzbarsky
http://hg.mozilla.org/mozilla-central/rev/5a21d2b181e9
http://hg.mozilla.org/mozilla-central/rev/1ff736fd5e41
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Priority: -- → P4
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2a1
Blocks: 535072
I just spent part of a day tracking down a problem in an older extension (I did not write the original code).  It turns out that the code assumed that getComputedStyle() would NOT return quotes within url() values but because of this bug fix that is not a valid assumption in Firefox 3.6.

I added a note to the end of this section:
  https://developer.mozilla.org/en/Firefox_3.6_for_developers#DOM

Is more documentation needed somewhere?  I suspect this change will affect other pages and extensions too....
(In reply to comment #7)
> I suspect this change will affect other pages and extensions too....

Like the N900 mobile version of Google Images. See bug 537218.
Blocks: 537218
No longer blocks: 537218
Depends on: 537218
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: