https://bugzilla.wikimedia.org/show_bug.cgi?id=27481
Summary: Wrong removal of spaces in javascript
Product: MediaWiki
Version: wikimedia-deployment
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: Normal
Component: Resource Loader
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
Hello,
Resource Loader seems to wrongly remove spaces in javascript code in some cases
using debug=false. With debug=true the code remains untouched, so no problem
appears.
Test case. The original code is located under [1]. The code compressed by
Resource Loader is located under [2]. There is the following line in the first
listing:
InterwikiLinks[i].className += " FA"
after the compressing it appears to be:
InterwikiLinks[i].className += "FA" (note the dropped space)
Another case.
InterwikiLinks[i].title = "Гэта абраны артыкул на іншай мове.";
after the compressing appears to be:
InterwikiLinks[i].title = "Гэтаабраныартыкулнаіншаймове."; (all the spaces are
dropped)
The original code is the valid javascript code, but looks like Resource Loader
lost the quote-sign balance and started compressing string literals.
[1] http://be-x-old.wikipedia.org/wiki/MediaWiki:Common.js
[2]
http://bits.wikimedia.org/be-x-old.wikipedia.org/load.php?debug=false&lang=be-tarask&modules=site&only=scripts&skin=vector&version=20110216T235746Z
--
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
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l