You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Rob Tompkins (JIRA)" <ji...@apache.org> on 2016/12/30 14:22:58 UTC

[jira] [Updated] (TEXT-48) StringEscapeUtils.unescapeEcmaScript: No hexadecimal nor octal encoding supported

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

Rob Tompkins updated TEXT-48:
-----------------------------
    Fix 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
>            Reporter: Jan Peter Stotz
>              Labels: escaping
>             Fix For: 1.1
>
>
> 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.3.4#6332)