wp_kses_js_entities

函数
wp_kses_js_entities ( $content )
参数
  • (string) $content
    Required:
返回值
  • (string)
定义位置
相关方法
wp_kses_named_entitieswp_kses_decode_entitieswp_kses_xml_named_entitieswp_kses_normalize_entitieswp_kses_split
引入
1.0.0
弃用
4.7.0

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.

function wp_kses_js_entities( $content ) {
	_deprecated_function( __FUNCTION__, '4.7.0' );

	return preg_replace( '%&s*{[^}]*(}s*;?|$)%', '', $content );
}