You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Matthew R Hurne (JIRA)" <ji...@apache.org> on 2008/04/11 17:38:04 UTC
[jira] Created: (LANG-423) StringEscapeUtils.escapeJava() behavior
changed; backslash escapes '/' characters
StringEscapeUtils.escapeJava() behavior changed; backslash escapes '/' characters
---------------------------------------------------------------------------------
Key: LANG-423
URL: https://issues.apache.org/jira/browse/LANG-423
Project: Commons Lang
Issue Type: Bug
Affects Versions: 2.4
Reporter: Matthew R Hurne
StringEscapeUtils.escapeJava(String str) escapes forward-slash ("/") characters. Prior to 2.4, this was not the case. This is caused by the patch in LANG-363, which changed the behavior of StringEscapeUtils.escapeJavaScript(String str) to escape forward-slashes for compatibliity with IE. The change was implemented in code common to both methods; StringEscapeUtils.escapeJavaStyleString() .
This side-effect change to StringEscapeUtils.escapeJava() is a problem in my project. I don't see any reason why it is necessary to escape forward-slashes in escapeJava(), so I suggest the behavior be changed so that escapeJavaScript() escapes forward-slashes, but escapeJava() does not.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (LANG-423)
StringEscapeUtils.escapeJava() behavior changed; backslash escapes '/'
characters
Posted by "Matthew R Hurne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588056#action_12588056 ]
mhurne edited comment on LANG-423 at 4/11/08 10:50 AM:
----------------------------------------------------------------
Hehe, looking at that diff, it appears someone already implemented a nearly identical fix in svn. So I suppose my patch isn't really needed. I'm leaving the ticket open, however.
was (Author: mhurne):
Hehe, looking at that diff, it appears someone already implemented a nearly identical fix in svn.
> StringEscapeUtils.escapeJava() behavior changed; backslash escapes '/' characters
> ---------------------------------------------------------------------------------
>
> Key: LANG-423
> URL: https://issues.apache.org/jira/browse/LANG-423
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 2.4
> Reporter: Matthew R Hurne
> Attachments: patch.diff
>
>
> StringEscapeUtils.escapeJava(String str) escapes forward-slash ("/") characters. Prior to 2.4, this was not the case. This is caused by the patch in LANG-363, which changed the behavior of StringEscapeUtils.escapeJavaScript(String str) to escape forward-slashes for compatibliity with IE. The change was implemented in code common to both methods; StringEscapeUtils.escapeJavaStyleString() .
> This side-effect change to StringEscapeUtils.escapeJava() is a problem in my project. I don't see any reason why it is necessary to escape forward-slashes in escapeJava(), so I suggest the behavior be changed so that escapeJavaScript() escapes forward-slashes, but escapeJava() does not.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (LANG-423) StringEscapeUtils.escapeJava() behavior
changed; backslash escapes '/' characters
Posted by "Matthew R Hurne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthew R Hurne closed LANG-423.
--------------------------------
Resolution: Duplicate
Closing. I see now this duplicates LANG-421. Don't know why I didn't see that in my search results before I created this ticket...
> StringEscapeUtils.escapeJava() behavior changed; backslash escapes '/' characters
> ---------------------------------------------------------------------------------
>
> Key: LANG-423
> URL: https://issues.apache.org/jira/browse/LANG-423
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 2.4
> Reporter: Matthew R Hurne
> Attachments: patch.diff
>
>
> StringEscapeUtils.escapeJava(String str) escapes forward-slash ("/") characters. Prior to 2.4, this was not the case. This is caused by the patch in LANG-363, which changed the behavior of StringEscapeUtils.escapeJavaScript(String str) to escape forward-slashes for compatibliity with IE. The change was implemented in code common to both methods; StringEscapeUtils.escapeJavaStyleString() .
> This side-effect change to StringEscapeUtils.escapeJava() is a problem in my project. I don't see any reason why it is necessary to escape forward-slashes in escapeJava(), so I suggest the behavior be changed so that escapeJavaScript() escapes forward-slashes, but escapeJava() does not.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (LANG-423) StringEscapeUtils.escapeJava()
behavior changed; backslash escapes '/' characters
Posted by "Matthew R Hurne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588056#action_12588056 ]
Matthew R Hurne commented on LANG-423:
--------------------------------------
Hehe, looking at that diff, it appears someone already implemented a nearly identical fix in svn.
> StringEscapeUtils.escapeJava() behavior changed; backslash escapes '/' characters
> ---------------------------------------------------------------------------------
>
> Key: LANG-423
> URL: https://issues.apache.org/jira/browse/LANG-423
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 2.4
> Reporter: Matthew R Hurne
> Attachments: patch.diff
>
>
> StringEscapeUtils.escapeJava(String str) escapes forward-slash ("/") characters. Prior to 2.4, this was not the case. This is caused by the patch in LANG-363, which changed the behavior of StringEscapeUtils.escapeJavaScript(String str) to escape forward-slashes for compatibliity with IE. The change was implemented in code common to both methods; StringEscapeUtils.escapeJavaStyleString() .
> This side-effect change to StringEscapeUtils.escapeJava() is a problem in my project. I don't see any reason why it is necessary to escape forward-slashes in escapeJava(), so I suggest the behavior be changed so that escapeJavaScript() escapes forward-slashes, but escapeJava() does not.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (LANG-423) StringEscapeUtils.escapeJava() behavior
changed; backslash escapes '/' characters
Posted by "Matthew R Hurne (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthew R Hurne updated LANG-423:
---------------------------------
Attachment: patch.diff
Attached is a patch that will revert the behavior of both variants of StringEscapeUtils.escapeJava() to NOT escape forward slashes.
> StringEscapeUtils.escapeJava() behavior changed; backslash escapes '/' characters
> ---------------------------------------------------------------------------------
>
> Key: LANG-423
> URL: https://issues.apache.org/jira/browse/LANG-423
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 2.4
> Reporter: Matthew R Hurne
> Attachments: patch.diff
>
>
> StringEscapeUtils.escapeJava(String str) escapes forward-slash ("/") characters. Prior to 2.4, this was not the case. This is caused by the patch in LANG-363, which changed the behavior of StringEscapeUtils.escapeJavaScript(String str) to escape forward-slashes for compatibliity with IE. The change was implemented in code common to both methods; StringEscapeUtils.escapeJavaStyleString() .
> This side-effect change to StringEscapeUtils.escapeJava() is a problem in my project. I don't see any reason why it is necessary to escape forward-slashes in escapeJava(), so I suggest the behavior be changed so that escapeJavaScript() escapes forward-slashes, but escapeJava() does not.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.