wp_kses_js_entities()
wp_kses_js_entities( string $string ) 删除Netscape 4早期版本中…
wp_kses_js_entities( string $string )
删除Netscape 4早期版本中的HTML JavaScript实体。
Removes the HTML JavaScript entities found in early versions of Netscape 4.
删除Netscape 4早期版本中的HTML JavaScript实体。
Removes the HTML JavaScript entities found in early versions of Netscape 4.
目录锚点:#说明#参数#源码
说明(Description)
以前,此函数是从kses的原始导入中提取的,并删除了仅在早期版本的Netscape 4中存在的特定漏洞。然而,此漏洞从未影响任何其他浏览器,可以认为对现代web来说是安全的。考虑到它所带来的性能和能量需求,清除此漏洞的正则表达式已被删除,现在只需将其输入传递给返回。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$string | (string) |
源码(Source)
/** * 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); }
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.7.0 | wp-includes/deprecated.php | 5 | 17 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。
还没有任何评论,赶紧来占个楼吧!