General: Add missing URL-encoding and add extra hardening to plugin and template names when they're displayed in the admin area.
Props kawauso, Mte90 for initial patches Fixes #13377 Built from https://develop.svn.wordpress.org/trunk@41399 git-svn-id: http://core.svn.wordpress.org/trunk@41232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -772,7 +772,7 @@ function page_template_dropdown( $default = '', $post_type = 'page' ) {
|
||||
ksort( $templates );
|
||||
foreach ( array_keys( $templates ) as $template ) {
|
||||
$selected = selected( $default, $templates[ $template ], false );
|
||||
echo "\n\t<option value='" . $templates[ $template ] . "' $selected>$template</option>";
|
||||
echo "\n\t<option value='" . esc_attr( $templates[ $template ] ) . "' $selected>" . esc_html( $template ) . "</option>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user