DecodeHareScript (open)
Converts special characters as used in HareScript.
Syntax
// Core function, no LOADLIB necessary
STRING FUNCTION DecodeHareScript(STRING text)Parameters
STRING textString to decode
Return value
STRINGThe decoded string
Description
DecodeHareScript converts HareScript encoded strings back to strings without HareScript encoded ' (single quotes), " (double quotes), \ (backslashes), \uXXXX (unicode characters) and \xXX (bytes).
Examples
// returns "alert('Johnny and Jane')"
STRING example1 := DecodeHareScript("alert(\'Johnny and Jane\')");
// returns "alert('A\n\b')"
STRING example2 := DecodeHareScript("alert(\'A\\n\\b\')");