You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Pascal Schumacher (JIRA)" <ji...@apache.org> on 2016/12/26 16:43:58 UTC
[jira] [Commented] (TEXT-44) NumericEntityUnescaper.translate
throws an IllegalArgumentException if entityValue > MAX_CODE_POINT
[ https://issues.apache.org/jira/browse/TEXT-44?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15778632#comment-15778632 ]
Pascal Schumacher commented on TEXT-44:
---------------------------------------
Issue moved from commons-lang to commons-text, because WordUtils was ported to commons-text and and the commons-lang version will soon be deprecated.
> NumericEntityUnescaper.translate throws an IllegalArgumentException if entityValue > MAX_CODE_POINT
> ---------------------------------------------------------------------------------------------------
>
> Key: TEXT-44
> URL: https://issues.apache.org/jira/browse/TEXT-44
> Project: Commons Text
> Issue Type: Bug
> Reporter: Miquel
> Priority: Minor
>
> We found that using the function StringEscapeUtils.unescapeHtml4 crashes if the argument is "�" and throws an IllegalArgumentException.
> This happens because internally it calls the function NumericEntityUnescaper.translate and doesn't check if the value is bigger than 0x10FFFF (MAX_CODE_POINT) that is a check inside Character.toChar.
> Maybe we need to check that the entity value is less than Char.MAX_CODE_POINT.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)