https://bugzilla.wikimedia.org/show_bug.cgi?id=27528
P.Copp <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #3 from P.Copp <[email protected]> 2011-02-18 13:53:51 UTC --- When JavaScriptDistiller will be rewritten, please note that it's not trivial to safely minify js when allowing arbitrary user input. That's because of the division/regex conflict in javascript's grammar, which can not be resolved only by looking at the previous token: (a+b)/(c+d)/g // division operator if(1)/a /g.exec('Pa ss'); //regex Althought this might seem to be edge cases, considering the amount of javascript being used on the different projects, it is likely that they will be hit eventually. So to do minifying without breaking correct javascript, you'll need to do basic stack parsing on the javascript. I've written sth. similar in C a while ago, so if someone is willing to review or use it, I can try to port it to php and post it here. -- 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
