js_escape()
Deprecated since 2.8.0. It is no longer supported and may be removed in future releases. Use esc_js() instead.
Escape single quotes, specialchar double quotes, and fix line endings.
The filter js_escape is also applied by esc_js().
No Hooks.
Returns
String. Escaped text.
Usage
js_escape( $text );
- $text(string) (required)
- The text to be escaped.
Notes
- See: esc_js()
Changelog
| Since 2.0.4 | Introduced. |
| Deprecated since 2.8.0 | Use esc_js() |
js_escape() js escape code WP 6.8.3
function js_escape( $text ) {
_deprecated_function( __FUNCTION__, '2.8.0', 'esc_js()' );
return esc_js( $text );
}