wp_kses_js_entities

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

WordPress Version: 6.1

/**
 * Removes the HTML JavaScript entities found in early versions of Netscape 4.
 *
 * Previously, this function was pulled in from the original
 * import of kses and removed a specific vulnerability only
 * existent in early version of Netscape 4. However, this
 * vulnerability never affected any other browsers and can
 * be considered safe for the modern web.
 *
 * The regular expression which sanitized this vulnerability
 * has been removed in consideration of the performance and
 * energy demands it placed, now merely passing through its
 * input to the return.
 *
 * @since 1.0.0
 * @deprecated 4.7.0 Officially dropped security support for Netscape 4.
 *
 * @param string $content
 * @return string
 */
function wp_kses_js_entities($content)
{
    _deprecated_function(__FUNCTION__, '4.7.0');
    return preg_replace('%&\s*\{[^}]*(\}\s*;?|$)%', '', $content);
}

WordPress Version: 4.8

/**
 * Removes the HTML JavaScript entities found in early versions of Netscape 4.
 *
 * Previously, this function was pulled in from the original
 * import of kses and removed a specific vulnerability only
 * existent in early version of Netscape 4. However, this
 * vulnerability never affected any other browsers and can
 * be considered safe for the modern web.
 *
 * The regular expression which sanitized this vulnerability
 * has been removed in consideration of the performance and
 * energy demands it placed, now merely passing through its
 * input to the return.
 *
 * @since 1.0.0
 * @deprecated 4.7.0 Officially dropped security support for Netscape 4.
 *
 * @param string $string
 * @return string
 */
function wp_kses_js_entities($string)
{
    _deprecated_function(__FUNCTION__, '4.7.0');
    return preg_replace('%&\s*\{[^}]*(\}\s*;?|$)%', '', $string);
}

WordPress Version: 4.7

/**
 * Removes the HTML JavaScript entities found in early versions of Netscape 4.
 *
 * Previously, this function was pulled in from the original
 * import of kses and removed a specific vulnerability only
 * existent in early version of Netscape 4. However, this
 * vulnerability never affected any other browsers and can
 * be considered safe for the modern web.
 *
 * The regular expression which sanitized this vulnerability
 * has been removed in consideration of the performance and
 * energy demands it placed, now merely passing through its
 * input to the return.
 *
 * @since 1.0.0
 * @deprecated deprecated since 4.7
 *
 * @param string $string
 * @return string
 */
function wp_kses_js_entities($string)
{
    _deprecated_function(__FUNCTION__, '4.7.0');
    return preg_replace('%&\s*\{[^}]*(\}\s*;?|$)%', '', $string);
}

WordPress Version: 3.7

/**
 * Removes the HTML JavaScript entities found in early versions of Netscape 4.
 *
 * @since 1.0.0
 *
 * @param string $string
 * @return string
 */
function wp_kses_js_entities($string)
{
    return preg_replace('%&\s*\{[^}]*(\}\s*;?|$)%', '', $string);
}