Last modified: 2011-05-10 20:16:03 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T30861, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 28861 - Data URIs in style sheets gets mangeled
Data URIs in style sheets gets mangeled
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.17.x
All All
: Normal normal (vote)
: ---
Assigned To: Trevor Parscal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-05-06 20:54 UTC by jeblad
Modified: 2011-05-10 20:16 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description jeblad 2011-05-06 20:54:18 UTC
Manually created data URIs in private style sheets and in system space gets an additional "path". Typically such data URIs are used for background images like this

  url(data:image/....

but will end up like this from Load.php

  url(/w/data:image/...

This will then fail to load.

A work around is to use Javascript and set the background-image property from the code instead.

Additional example on Wikipedia
http://no.wikipedia.org/w/index.php?title=MediaWiki%3AVector.css&action=historysubmit&diff=8743561&oldid=8595275
Comment 1 Brion Vibber 2011-05-10 19:18:02 UTC
I can confirm that this happens with data: URL but not http: URL.

CSSMin::minify() seems to be explicitly checking for https?:// so trips up on other URL types.
Comment 2 Brion Vibber 2011-05-10 20:16:03 UTC
r87840 should do it on trunk: switches from the explicit http/https check to using parse_url to grab the scheme and treating them all the same.

Path-only URLs have no scheme, so continue on to the path adjustment or embedding paths.

Marking for merge to 1.18 and 1.17.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links