commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Giles <mgi...@visionstudio.com>
Subject escapeJavaScript and LANG-363
Date Tue, 08 Apr 2008 19:18:12 GMT
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


Mime
View raw message