ePublisher Platform XSLT Extensions
 
string JavaScriptEncoding (string value)
 
Convert all non-ASCII characters to Unicode escape sequences. Also convert all ASCII characters less than 32 along with problematic escape characters, i.e. \, to Unicode escape sequences.
Parameters:
value
The value.
Returns:
A string.
Convert Hello!
to JavaScript encoded text.
<xsl:value-of select="wwstring:JavaScriptEncoding('Hello\nworld!\n')" />