X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/d3b1ea255664edd2deef17f900a655613d20820d..672d6bc6da735e745275ef7a86341dc1178da8d2:/wp-includes/category-template.php?ds=sidebyside diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 61f2faf1..52b42baf 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -68,7 +68,7 @@ function get_category_parents( $id, $link = false, $separator = '/', $nicename = } if ( $link ) - $chain .= 'cat_name ) . '">'.$name.'' . $separator; + $chain .= 'cat_name ) ) . '">'.$name.'' . $separator; else $chain .= $name.$separator; return $chain; @@ -190,17 +190,17 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false ) case 'multiple': if ( $category->parent ) $thelist .= get_category_parents( $category->parent, true, $separator ); - $thelist .= 'name ) . '" ' . $rel . '>' . $category->name.''; + $thelist .= 'name ) ) . '" ' . $rel . '>' . $category->name.''; break; case 'single': - $thelist .= 'name ) . '" ' . $rel . '>'; + $thelist .= 'name ) ) . '" ' . $rel . '>'; if ( $category->parent ) $thelist .= get_category_parents( $category->parent, false, $separator ); $thelist .= $category->name.''; break; case '': default: - $thelist .= 'name ) . '" ' . $rel . '>' . $category->cat_name.''; + $thelist .= 'name ) ) . '" ' . $rel . '>' . $category->cat_name.''; } } $thelist .= ''; @@ -213,17 +213,17 @@ function get_the_category_list( $separator = '', $parents='', $post_id = false ) case 'multiple': if ( $category->parent ) $thelist .= get_category_parents( $category->parent, true, $separator ); - $thelist .= 'name ) . '" ' . $rel . '>' . $category->cat_name.''; + $thelist .= 'name ) ) . '" ' . $rel . '>' . $category->cat_name.''; break; case 'single': - $thelist .= 'name ) . '" ' . $rel . '>'; + $thelist .= 'name ) ) . '" ' . $rel . '>'; if ( $category->parent ) $thelist .= get_category_parents( $category->parent, false, $separator ); $thelist .= "$category->cat_name"; break; case '': default: - $thelist .= 'name ) . '" ' . $rel . '>' . $category->name.''; + $thelist .= 'name ) ) . '" ' . $rel . '>' . $category->name.''; } ++$i; } @@ -352,6 +352,8 @@ function wp_dropdown_categories( $args = '' ) { $tab_index_attribute = " tabindex=\"$tab_index\""; $categories = get_categories( $r ); + $name = esc_attr($name); + $class = esc_attr($class); $output = ''; if ( ! empty( $categories ) ) {