Closed
Bug 1100368
Opened 10 years ago
Closed 10 years ago
css concatenation breaks data: urls
Categories
(Bugzilla :: Bugzilla-General, defect)
Bugzilla
Bugzilla-General
Tracking
()
RESOLVED
FIXED
Bugzilla 5.0
People
(Reporter: glob, Assigned: glob)
Details
Attachments
(1 file)
623 bytes,
patch
|
dylan
:
review+
|
Details | Diff | Splinter Review |
using a data: url in css while css concatenation is enabled results in a broken url.
background: #c8c8c8 url("data:image/gif;base64,R0lGODlhKAAoAIAB..");}
becomes
background: #c8c8c8 url(../../skins/contrib/Dusk/data:image/gif;base64,R0lGODlhKAAoAIAB..");}
Attachment #8523869 -
Flags: review?(dylan)
Summary: javascript concatenation breaks data: urls → css concatenation breaks data: urls
Comment 2•10 years ago
|
||
Comment on attachment 8523869 [details] [diff] [review]
1100368_1.patch
Review of attachment 8523869 [details] [diff] [review]:
-----------------------------------------------------------------
r=dylan
::: Bugzilla/Template.pm
@@ +542,5 @@
> # directory from the source
> $url =~ s/(^['"]|['"]$)//g;
> + if (substr($url, 0, 1) eq '/' || substr($url, 0, 5) eq 'data:') {
> + return 'url(' . $url . ')';
> + }
Not that it matters here, but a regex is faster at not-matching than the above construction. (and the above is faster in the case of matching input).
Attachment #8523869 -
Flags: review?(dylan) → review+
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
2e000da..f43045d 5.0 -> 5.0
To ssh://gitolite3@git.mozilla.org/bugzilla/bugzilla.git
a50e8fd..47da91d master -> master
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: approval5.0+
Flags: approval+
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•