You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Michael Giles <mg...@visionstudio.com> on 2008/04/08 21:18:12 UTC
escapeJavaScript and LANG-363
Should escapeJavaScript really being escaping forward slashes
(https://issues.apache.org/jira/browse/LANG-363)? I know a user
reported an issue with this, but the new behavior seems to break all
sorts of code on my end. For instance,
if I am passing some text, that contains a URL and might contain quotes,
into a JavaScript function (e.g. "Go to Steve's page -
http://www.google.com"), the old code would have escaped the single
quote and passed the rest through. The new code mangles the URL by
making it "Go to Steve\'s page - http:\/\/www.google.com". That is
definitely not the desired behavior. I've never had a problem with /'s
being passed through. I believe the case the user is reporting is a
special case in how IE deals with <script> tags inside of JavaScript.
Escaping all /'s is not the way to fix that problem.
I believe this change needs to be rolled back.
-Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org