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:47:58 UTC
[jira] [Moved] (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 ]
Pascal Schumacher moved LANG-1217 to TEXT-48:
---------------------------------------------
Affects Version/s: (was: 3.4)
Component/s: (was: lang.*)
Workflow: jira (was: Default workflow, editable Closed status)
Key: TEXT-48 (was: LANG-1217)
Project: Commons Text (was: Commons Lang)
> 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
>
> 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)