User "Brion VIBBER" posted a comment on MediaWiki.r98281.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/98281#c23304
Commit summary:

* (bug 31187) Fix for user JavaScript validation to allow identifiers with 
valid Unicode letter characters

Followup r91591, r93020: patch to jsminplus to support Unicode chars and char 
escapes in identifiers

Fast-path check keeps runtime about the same on most scripts (eg jquery.js 
parsing was abround 4100ms both before and after on my test machine)
Slow-path code kicks in if plain ASCII word chars don't extend all the way to 
the next whitespace or punctuation char.
Using PCRE's Unicode properties magic to ensure that we're catching everything, 
following ECMA-262 edition 5.1 spec.

Note that identifiers using escapes don't get normalized to their UTF-8 form; 
this might be a nice thing to do as it saves a couple bytes, but currently 
there's no change made to output.


Added QUnit tests to verify that unicode letter & escapes work in identifiers 
in all supported browsers (ok back to IE 6, yay)

Comment:

Per bug 31187 a workaround is in use on eo.wikipedia.org for some affected 
scripts, but this'd be nice to get deployed. :) I'm not merging direct to 
1.18wmf1 as the process seems to get confused when someone who can't 
immediately push code merges to the deployment branch.

Also needs a fix from r94614 for the QUnit test case.

Already merged to 1.18 with the above as r98285.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to