Use esc_attr() consistently in wp_dropdown_pages().

git-svn-id: http://svn.automattic.com/wordpress/trunk@19081 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin 2011-10-28 22:40:09 +00:00
parent eeec5eeda1
commit 91a448be74
1 changed files with 1 additions and 2 deletions

View File

@ -778,13 +778,12 @@ function wp_dropdown_pages($args = '') {
$pages = get_pages($r);
$output = '';
$name = esc_attr($name);
// Back-compat with old system where both id and name were based on $name argument
if ( empty($id) )
$id = $name;
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 )
$output .= "\t<option value=\"-1\">$show_option_no_change</option>";
if ( $show_option_none )