WordPress开发者和主题制作者的搜索引擎



js_escape ›

Since2.0.4
已弃用2.8.0
js_escape ( $text )
参数:
  • (string) $text The text to be escaped.
    Required: Yes
查看:
返回:
  • (string) Escaped text.
定义在:
文档:

Escape single quotes, specialchar double quotes, and fix line endings.

The filter {@see 'js_escape'} is also applied by esc_js().



源码

function js_escape( $text ) {
	_deprecated_function( __FUNCTION__, '2.8.0', 'esc_js()' );
	return esc_js( $text );
}