commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thiago Souza (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LANG-313) Wrong behavior of Entities.unescape
Date Thu, 18 Jan 2007 02:20:29 GMT

    [ https://issues.apache.org/jira/browse/LANG-313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465637
] 

Thiago Souza commented on LANG-313:
-----------------------------------

Hi,

   You're right, it looks like it's fixed in 2.3-SNAPSHOT.

Regards,
Thiago Souza

> 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("&
&amp;"). It outputs "& &amp;" 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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message