Last modified: 2011-02-17 17:08:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 27492 - JS minification error with regular expressions
JS minification error with regular expressions
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
All All
: Normal critical (vote)
: ---
Assigned To: Trevor Parscal
Depends on:
Blocks: 26611 26676
  Show dependency treegraph
Reported: 2011-02-17 10:28 UTC by Michael M.
Modified: 2011-02-17 17:08 UTC (History)
2 users (show)

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


Description Michael M. 2011-02-17 10:28:06 UTC
The JS minification interprets // in regular expressions as beginning a comment and so removes following code.

  if (/\/commons\//.test($this.find('img').attr('src')))
is minified to
Comment 2 Krinkle 2011-02-17 11:45:38 UTC

var $this=$('#content');

   |> SyntaxError: Parse error

Comment 3 Roan Kattouw 2011-02-17 17:08:37 UTC
This only fails for regexes which contain a slash at the end (causing //) AND contain a slash somewhere in the middle (causing the minifier to incorrectly regard it as the end of the regex).

Fixed in r82340

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