Uses
Uses | Description |
---|---|
wp-includes/formatting.php: esc_js() | Escape single quotes, htmlspecialchar ” &, and fix line endings. |
wp-includes/functions.php: _deprecated_function() | Mark a function as deprecated and inform when it has been used. |
This function has been deprecated. Use esc_js() instead.
Escape single quotes, specialchar double quotes, and fix line endings.
The filter ‘js_escape’ is also applied by esc_js().
(string) (Required) The text to be escaped.
(string) Escaped text.
File: wp-includes/deprecated.php
function js_escape( $text ) { _deprecated_function( __FUNCTION__, '2.8.0', 'esc_js()' ); return esc_js( $text ); }
Version | Description |
---|---|
2.8.0 | Use esc_js() |
2.0.4 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/js_escape