Skip to content

script.unescapeControlCharacters ​

Replaces Unicode escape sequences in a string with the characters they represent. For example, \u000a becomes a newline. Use it to restore text escaped with script.escapeControlCharacters.

It converts every sequence in the form \uXXXX, not only those for control characters.

js
script.unescapeControlCharacters(input)

Parameters ​

ParameterTypeDescription
inputstringThe string to unescape.

Returns ​

string

The string with its escape sequences converted to characters.

Examples ​

js
const original = script.unescapeControlCharacters("Line one\\u000aLine two");
text
Line one
Line two