Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1, 2.2
-
None
-
None
Description
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