From 8a45aefe56f19137e4ab272ae01fcb9a1da9d5bf Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 11 Jul 2014 18:55:48 +0000 Subject: [PATCH] Escape taxonomy name when used in attributes in post_categories_meta_box(). props pbearne. fixes #28836. git-svn-id: https://develop.svn.wordpress.org/trunk@29099 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/meta-boxes.php | 57 ++++++++++++++-------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/src/wp-admin/includes/meta-boxes.php b/src/wp-admin/includes/meta-boxes.php index 902bf95876..ef0734e329 100644 --- a/src/wp-admin/includes/meta-boxes.php +++ b/src/wp-admin/includes/meta-boxes.php @@ -404,9 +404,8 @@ function post_tags_meta_box( $post, $box ) { $args = $box['args']; } $r = wp_parse_args( $args, $defaults ); - $tax = $r['taxonomy']; - $tax_name = esc_attr( $tax ); - $taxonomy = get_taxonomy( $tax ); + $tax_name = esc_attr( $r['taxonomy'] ); + $taxonomy = get_taxonomy( $r['taxonomy'] ); $user_can_assign_terms = current_user_can( $taxonomy->cap->assign_terms ); $comma = _x( ',', 'tag delimiter' ); ?> @@ -462,50 +461,50 @@ function post_categories_meta_box( $post, $box ) { $args = $box['args']; } $r = wp_parse_args( $args, $defaults ); - $taxonomy = $r['taxonomy']; - $tax = get_taxonomy( $taxonomy ); + $tax_name = esc_attr( $r['taxonomy'] ); + $taxonomy = get_taxonomy( $r['taxonomy'] ); ?> -
-