JsStringEncode obsolete(text) Last updated: 13. Nov 2023

Encodes a string so it escapes all special chars.

Parameters

Name Type Description
text string Text to encode.

Returns

A string.

Example

Code example (#JS)

#JS is mixed HTML (or other text file) with inline JavaScript with # starting and ending each inline statement.
#{
    var text = "1,2,3,4,5,6,7";
    
    /* Split text