Function zenario.htmlspecialchars()

In JavaScript:
zenario.htmlspecialchars(
text, preserveLineBreaks, preserveSpaces
)

Description

Replaces any special characters in a string with html entities.

E.g. "<" would be replaced with "&lt;" and "&" would be replaced by "&amp;"

Parameters

text

A string containing plain text to escape.

preserveLineBreaks

If this is set to true, line breaks will be replaced by <br/> tags.

Return Value

An escaped string.