Login    Sites MenuBlueStep

BlueStep Platform Support

RelateScript
Outline full outline 
Overview 
Data Types 
Operators 
Statements 
Functions 
Data Conversion 
String Functions 
compareToIgnoreCase(...) 
escapeJS(...) 
indexOf(...) 
lastIndexOf(...) 
isKey(...) 
matches(...) 
nullOrEmpty(...) 
pad(...) 
replace(...) 
secureHash(...) 
SHA1AsBase64(...) 
SHA1AsHex(...) 
substring(...) 
toLowerCase(...) 
toTitleCaps(...) 
toUpperCase(...) 
trim(...) 
xssHtmlSafe(...) 
xssSafe(...) 
HTML/CSS/JavaScript 
Array Functions 
Date/Time Functions 
Mathematical Functions 
Advanced Functions 
Restricted Functions 
Working with Relate Data 
How Formulas Work 
Related Topics 

Escape a string for JavaScript. It will escape characters like ', ", \n, \r, and <. Handy if you're putting some HTML into JavaScript, e.g. you have some JSON with HTML in it and call JSON.parse on it.

Syntax:
escapeJS(source-string)
source-string.escapeJS()