You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2013/04/26 14:24:16 UTC

[jira] [Resolved] (WICKET-5159) Replace usage of JavaScript eval() with plain JS in headed contribution decoding

     [ https://issues.apache.org/jira/browse/WICKET-5159?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-5159.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.8.0

Replaced with eval() with a usage of RegExp. This way the variable names are properly replaced where needed by the optimizer.
                
> Replace usage of JavaScript eval() with plain JS in headed contribution decoding
> --------------------------------------------------------------------------------
>
>                 Key: WICKET-5159
>                 URL: https://issues.apache.org/jira/browse/WICKET-5159
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 6.7.0
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>             Fix For: 6.8.0
>
>
> Wicket uses the special "]^" sequence to encode ']' in Ajax responses.
> To make the replacement a regex is executed in an eval() in the private function 'replaceAll' in wicket-ajax-jquery.js.
> We found a problem with the usage of eval() when Google Closure optimizer is used - the text to be eval-ed doesn't see the renamed variables by the optimizer. Thus the whole replacement breaks and the produced outcome is not the expected one.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira