Skip to content

js_sanitize

Jared Smith edited this page Apr 25, 2016 · 3 revisions

js_sanitize - sanitizes JavaScript attributes

Description

$string js_sanitize(string $string)

replaces special characters with special meaning to JavaScript with escape character equivalents.

Parameters

string

string you want to sanitize

Return value:

Returns sanitized string.

Examples

Clone this wiki locally