Escape the $s global.
fixes #32142. git-svn-id: https://develop.svn.wordpress.org/trunk@32298 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fdd254b5d8
commit
ca8d6fb60f
|
@ -494,12 +494,18 @@ function locate_template($template_names, $load = false, $require_once = true )
|
|||
function load_template( $_template_file, $require_once = true ) {
|
||||
global $posts, $post, $wp_did_header, $wp_query, $wp_rewrite, $wpdb, $wp_version, $wp, $id, $comment, $user_ID;
|
||||
|
||||
if ( is_array( $wp_query->query_vars ) )
|
||||
if ( is_array( $wp_query->query_vars ) ) {
|
||||
extract( $wp_query->query_vars, EXTR_SKIP );
|
||||
|
||||
if ( $require_once )
|
||||
require_once( $_template_file );
|
||||
else
|
||||
require( $_template_file );
|
||||
}
|
||||
|
||||
if ( isset( $s ) ) {
|
||||
$s = esc_attr( $s );
|
||||
}
|
||||
|
||||
if ( $require_once ) {
|
||||
require_once( $_template_file );
|
||||
} else {
|
||||
require( $_template_file );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue