Function: escape_js()

function escape_js(string $text): string;

Escapes the JavaScript special characters in the text.

Parameters

Name Pass type Value type Default value Description
$text by value string

The text to be escaped.

Returns

string

Returns the text with escaped JavaScript special characters.

Authors

Oleg Schildt

Package

Source code

See also