js_escape

The timeline below displays how wordpress function js_escape has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 4.6

/**
 * Escape single quotes, specialchar double quotes, and fix line endings.
 *
 * The filter {@see 'js_escape'} is also applied by esc_js().
 *
 * @since 2.0.4
 * @deprecated 2.8.0 Use esc_js()
 * @see esc_js()
 *
 * @param string $text The text to be escaped.
 * @return string Escaped text.
 */
function js_escape($text)
{
    _deprecated_function(__FUNCTION__, '2.8.0', 'esc_js()');
    return esc_js($text);
}

WordPress Version: 4.4

/**
 * Escape single quotes, specialchar double quotes, and fix line endings.
 *
 * The filter 'js_escape' is also applied by esc_js()
 *
 * @since 2.0.4
 * @deprecated 2.8.0 Use esc_js()
 * @see esc_js()
 *
 * @param string $text The text to be escaped.
 * @return string Escaped text.
 */
function js_escape($text)
{
    _deprecated_function(__FUNCTION__, '2.8', 'esc_js()');
    return esc_js($text);
}

WordPress Version: 3.7

/**
 * Escape single quotes, specialchar double quotes, and fix line endings.
 *
 * The filter 'js_escape' is also applied by esc_js()
 *
 * @since 2.0.4
 * @deprecated 2.8.0
 * @deprecated Use esc_js()
 * @see esc_js()
 *
 * @param string $text The text to be escaped.
 * @return string Escaped text.
 */
function js_escape($text)
{
    _deprecated_function(__FUNCTION__, '2.8', 'esc_js()');
    return esc_js($text);
}