P.Copp <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #3 from P.Copp <> 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:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Wikibugs-l mailing list

Reply via email to