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

Igor Vaynberg resolved WICKET-2727.
-----------------------------------

    Resolution: Won't Fix
      Assignee: Igor Vaynberg

$$ is needed as an escape character for $ otherwise how would you represent a 
string like this "${}" in the interpolator without it thinking that you forgot 
to git it a variable name?

the "${}" is represented as "$${}".

if you want to use "$$" literal then you have to escape it as "$$$$"

> Interpolator replace $$ by $ - breaks javascript templates using prototype 
> css selector
> ---------------------------------------------------------------------------------------
>
>                 Key: WICKET-2727
>                 URL: https://issues.apache.org/jira/browse/WICKET-2727
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.4.5
>            Reporter: Bruno Bieth
>            Assignee: Igor Vaynberg
>
> If I'm using the prototype css selector in a javascript template file, the 
> interpolator convert double $ into a single $. This gives weird runtime 
> errors as single $ is also a prototype selector (with a different semantic).
> I don't see why $$ should be replaced by the variable interpolator ?
> In VariableInterpolator (line 111) :
> {code}
>       while ((start = lowerPositive(string.indexOf("$$", pos), 
> string.indexOf("${", pos))) != -1)
>               {
>                       // Append text before possible variable
>                       buffer.append(string.substring(pos, start));
>                       if (string.charAt(start + 1) == '$')
>                       {
>                               buffer.append("$");
>                               pos = start + 2;
>                               continue;
>                       }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to