commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Tompkins (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (TEXT-48) StringEscapeUtils.unescapeEcmaScript: No hexadecimal nor octal encoding supported
Date Fri, 08 Dec 2017 19:06:01 GMT

     [ https://issues.apache.org/jira/browse/TEXT-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rob Tompkins updated TEXT-48:
-----------------------------
    Affects Version/s: 1.1

> StringEscapeUtils.unescapeEcmaScript: No hexadecimal nor octal encoding supported
> ---------------------------------------------------------------------------------
>
>                 Key: TEXT-48
>                 URL: https://issues.apache.org/jira/browse/TEXT-48
>             Project: Commons Text
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Jan Peter Stotz
>              Labels: escaping
>             Fix For: 1.x
>
>
> I encountered several JavaScript/EcmaScript strings that use octal or hexadecimal encoded
characters -  e.g. \042 or \x22 
> The only supported encoding variant is "unicode encoding" using "\u" as prefix. 
> I tried to unescape them using StringEscapeUtils.unescapeEcmaScript() however that fails
as both encodings are not supported (which is not mentioned).
> I searched the net a bit and found the following information:
> Octal encoding is still used around the net but has been removed in EC5: https://mathiasbynens.be/notes/javascript-escapes#octal
> Hexadecimal escape sequences however seems to be still allowed in EC5 and EC6:
> https://mathiasbynens.be/notes/javascript-escapes#hexadecimal



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message