Use esc_attr() consistently in wp_dropdown_pages().
git-svn-id: https://develop.svn.wordpress.org/trunk@19081 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8a48ef371f
commit
3f802f9570
|
@ -778,13 +778,12 @@ function wp_dropdown_pages($args = '') {
|
||||||
|
|
||||||
$pages = get_pages($r);
|
$pages = get_pages($r);
|
||||||
$output = '';
|
$output = '';
|
||||||
$name = esc_attr($name);
|
|
||||||
// Back-compat with old system where both id and name were based on $name argument
|
// Back-compat with old system where both id and name were based on $name argument
|
||||||
if ( empty($id) )
|
if ( empty($id) )
|
||||||
$id = $name;
|
$id = $name;
|
||||||
|
|
||||||
if ( ! empty($pages) ) {
|
if ( ! empty($pages) ) {
|
||||||
$output = "<select name=\"$name\" id=\"$id\">\n";
|
$output = "<select name='" . esc_attr( $name ) . "' id='" . esc_attr( $id ) . "'>\n";
|
||||||
if ( $show_option_no_change )
|
if ( $show_option_no_change )
|
||||||
$output .= "\t<option value=\"-1\">$show_option_no_change</option>";
|
$output .= "\t<option value=\"-1\">$show_option_no_change</option>";
|
||||||
if ( $show_option_none )
|
if ( $show_option_none )
|
||||||
|
|
Loading…
Reference in New Issue