Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
1.4.6
-
None
-
Windows XP SP3, Apache Jetty 6.1.22
Description
Many JavaScript libraries such as jQuery and MooTools use $$ to find out arrays of elements. Having $$('blaa') is currently replaced by Wicket into $('blaa'). Wanted behavior is to replace all $${...} with ${...}, not $$ with $.
Possible fix (don't really have time to look at this atm):
org.apache.wicket.util.template.VariableInterpolator:
Row 111:
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; }...
Shoud be changed to:
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) == '$' && string.charAt(start + 2) == '{')
{
buffer.append("${");
pos = start + 3;
continue;
}
...
(no JIRA markup for rich formatting available? uh)