You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Thiago Souza (JIRA)" <ji...@apache.org> on 2007/01/18 03:20:29 UTC

[jira] Commented: (LANG-313) Wrong behavior of Entities.unescape

    [ 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