commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew R Hurne (JIRA)" <>
Subject [jira] Updated: (LANG-423) StringEscapeUtils.escapeJava() behavior changed; backslash escapes '/' characters
Date Fri, 11 Apr 2008 17:46:04 GMT


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:
>             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.

View raw message