関数 esc_js()
2014/12/11
関数 esc_js()
定義ファイル :/blog/wp-includes/formatting.php 7
1 2 3 4 5 6 7 8 | function esc_js( $text ) { $safe_text = wp_check_invalid_utf8( $text ); $safe_text = _wp_specialchars( $safe_text, ENT_COMPAT ); $safe_text = preg_replace( '/&#(x)?0*(?(1)27|39);?/i', "'", stripslashes( $safe_text ) ); $safe_text = str_replace( "\r", '', $safe_text ); $safe_text = str_replace( "\n", '\\n', addslashes( $safe_text ) ); return apply_filters( 'js_escape', $safe_text, $text ); } |