js_escape

函数


js_escape ( $text )
参数
  • (string)
    $text
    The text to be escaped.
    Required:
返回值
  • (string) Escaped text.
相关
  • esc_js()
定义位置
  • wp-includes/deprecated.php
    , line 2062
引入
2.0.4
弃用
2.8.0

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 );
}