[
https://issues.apache.org/jira/browse/WICKET-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831118#action_12831118
]
Bruno Bieth commented on WICKET-2727:
-------------------------------------
Yes, I understand that you might want to escape the $ character, but I would
expect a more conventional escape character. You're using Velocity syntax, so
why not following Velocity's escaping way ? See :
http://velocity.apache.org/engine/devel/user-guide.html#escapingvalidvtlreferences
BTW, why do you bother doing interpolation yourself ? Why not use Velocity ?
> 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.