From 82ae8fb211aee3233ddbcc94c4c6f50216723028 Mon Sep 17 00:00:00 2001 From: jverber Date: Sat, 19 Jun 2004 03:57:57 +0000 Subject: [PATCH] Fix for bug 0000091: fixed encoding of special chars. git-svn-id: http://svn.automattic.com/wordpress/trunk@1437 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-functions.php | 2 ++ wp-admin/categories.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index dd0a74933..5561bf38a 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -113,6 +113,7 @@ function cat_rows($parent = 0, $level = 0, $categories = 0) { if ($categories) { foreach ($categories as $category) { if ($category->category_parent == $parent) { + $category->cat_name = htmlspecialchars($category->cat_name); $count = $wpdb->get_var("SELECT COUNT(post_id) FROM $wpdb->post2cat WHERE category_id = $category->cat_ID"); $pad = str_repeat('— ', $level); @@ -139,6 +140,7 @@ function wp_dropdown_cats($currentcat, $currentparent = 0, $parent = 0, $level = foreach ($categories as $category) { if ($currentcat != $category->cat_ID && $parent == $category->category_parent) { $count = $wpdb->get_var("SELECT COUNT(post_id) FROM $wpdb->post2cat WHERE category_id = $category->cat_ID"); $pad = str_repeat('– ', $level); + $category->cat_name = htmlspecialchars($category->cat_name); echo "\n\t