wpseek.com
A WordPress-centric search engine for devs and theme authors



js_escape › WordPress Function

Since2.0.4
Deprecated2.8.0
js_escape ( $text )
Parameters:
  • (string) $text The text to be escaped.
    Required: Yes
See:
Returns:
  • (string) Escaped text.
Defined at:
Codex:

Escape single quotes, specialchar double quotes, and fix line endings.

The filter {@see 'js_escape'} is also applied by esc_js().


Source

function js_escape( $text ) {
	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_js()' );
	return esc_js( $text );
}