[ https://issues.apache.org/jira/browse/WICKET-2727?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12831135#action_12831135 ]
Bruno Bieth commented on WICKET-2727: ------------------------------------- Right. I'm not going to argue whether velocity was created before wicket or not, but in my opinion escaping using a backslash is more natural / conventional thing to do. Also I doubt velocity will change its escape sequence, for the same exact reason (which actually is even more relevant given the amount of existing velocity code). I guess I shouldn't be using the interpolator with big javascript files anyway. I've actually split my file into two files. An interpolated one which contains only config code, and another not interpolated with the remaining code. Writing another interpolator using Velocity should be the way. This new interpolator could be part of wicket, and you could deprecate the other one ;) > 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.