[
https://issues.apache.org/jira/browse/LANG-313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henri Yandell closed LANG-313.
------------------------------
Resolution: Fixed
Unit test committed showing that this issue doesn't occur with the current Lang
trunk (and so won't be in the forthcoming 2.3).
svn ci -m "Adding a unit test to show that LANG-313 is not a problem in the
current trunk"
Sending src/test/org/apache/commons/lang/StringEscapeUtilsTest.java
Transmitting file data .
Committed revision 496931.
> Wrong behavior of Entities.unescape
> -----------------------------------
>
> Key: LANG-313
> URL: https://issues.apache.org/jira/browse/LANG-313
> Project: Commons Lang
> Issue Type: Bug
> Affects Versions: 2.1, 2.2
> Reporter: Thiago Souza
> Fix For: 2.3
>
> Attachments: LANG-313-test.patch
>
>
> Hi,
> There's seems to be a bug at Entities.unescape. Try for example
> StringEscapeUtils.unescapeHtml("& &"). It outputs "& &" instead of "&
> &". The problem is at this piece of code:
> if (entityValue == -1) {
> buf.append('&');
> buf.append(entityName);
> buf.append(';');
> } else {
> buf.append((char) (entityValue));
> }
> i = semi;
> The method always skips to the next ";", even if it doesn't finds the
> entity value and then disregarding any entity that may be actually be
> referred inside.
> Regards,
> Thiago Souza
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]