commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 25227] New: - StringEscapeUtils.unescapeHtml() doesn't handle hex entities
Date Thu, 04 Dec 2003 20:53:54 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25227>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25227

StringEscapeUtils.unescapeHtml() doesn't handle hex entities

           Summary: StringEscapeUtils.unescapeHtml() doesn't handle hex
                    entities
           Product: Commons
           Version: 2.0 Final
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Lang
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: mgiles@visionstudio.com


Pass a string into the unescapeHtml() method that contains a hex entity (i.e. 
&#xB7; instead of &#183;) and you will get a NumberFormatException.  The 
offending code is in Entity.java, line 690.  It should check whether the 
character after the # is 'x' and if so, prefix it with '0' and call 
Integer.decode().intValue() (or some other hex converting function).

Hex entities are valid HTML 
(http://www.htmlhelp.com/reference/html40/entities/latin1.html) so this should 
be supported.

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