https://bugzilla.wikimedia.org/show_bug.cgi?id=27396

           Summary: Production breaks URLs in CSS
           Product: MediaWiki
           Version: wikimedia-deployment
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: Normal
         Component: Resource Loader
        AssignedTo: tpars...@wikimedia.org
        ReportedBy: krinklem...@gmail.com
                CC: roan.katt...@gmail.com


On http://translatewiki.net/wiki/Thread:Support/Page_last_modified there is:

<pre>
...
( jQuery ) );


}, {"all": ".ui-button{display:inline-block; ... background:#e1e1e1 url(http:


mediaWiki.loader.implement("jquery.ui.core",function($,mw){ ...
</pre>

" ... " is inserted by me and not in the actual code

The "SyntaxError: Parse error" traces back to directly after "http:"

ie. the "//" in http:// was treated as a comment. I'm not sure whether this is
caused by the CSS minifer or by the javascript minifier that ran afterwards.


In the end obviously the JavaScript minifier is the one removing the //
comment, but the root cause could be in the CSS minifier.

Possible work around:
Don't minify the end output of load.php (ie. the "mediaWiki.loader.implement"
calls), but only run javascript minify on the modules themselfs between { and }
of the implemenet() call, and the CSS minifer on what is in the later argument.
Reason being that the call to mediaWiki.loader.load are so simple there's no
need to minify them, it would only bring in extra unneeded risks such as the js
minifier screwing in the css-string.

Ofcourse that's not a permanent solution as there could be a css string like
that inside a module as well such as:

$(el).attr('style', 'background: url(http:// ...
or 
appendCSS( 'el { background: url(http:// ...

This is breaking javascript execution completely on some pages of
TranslateWiki.net

--
Krinkle

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to