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:
Andrew Nacin 2015-04-27 05:09:24 +00:00
parent fdd254b5d8
commit ca8d6fb60f
1 changed files with 9 additions and 3 deletions

View File

@ -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 )
if ( isset( $s ) ) {
$s = esc_attr( $s );
}
if ( $require_once ) {
require_once( $_template_file );
else
} else {
require( $_template_file );
}
}