JavascriptUtils.escapeQuotes() misses escaping double quotes
------------------------------------------------------------
Key: WICKET-2458
URL: https://issues.apache.org/jira/browse/WICKET-2458
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.4.1
Reporter: Matthias Keller
The JavaDoc for
org.apache.wicket.util.string.JavascriptUtils.escapeQuotes(CharSequence) states:
"Escape quotes and double quotes so that they can be part of e.g. an alert
call."
But the actual implementation only escapes quotes:
CharSequence s = input;
if (s != null)
{
s = Strings.replaceAll(s, "'", "\\'");
}
return s;
Either the javadoc must be amended or the implementation must also escape
double quotes which probably would be the better choice as alerts can both
specified using single or double quotes.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.