From c3e1d51c20140d5966e16b584d258663716d602a Mon Sep 17 00:00:00 2001 From: saxmatt Date: Sun, 12 Dec 2004 20:41:19 +0000 Subject: [PATCH] Axing htmlspecialchars because it double-encodes-encodes. Better error handling around queries. git-svn-id: http://svn.automattic.com/wordpress/trunk@1940 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/admin-functions.php | 6 +- wp-admin/bookmarklet.php | 27 +++----- wp-admin/categories.php | 12 ++-- wp-admin/edit-comments.php | 4 +- wp-admin/edit-form-advanced.php | 2 +- wp-admin/edit-page-form.php | 2 +- wp-admin/edit.php | 8 ++- wp-admin/link-add.php | 36 +++++------ wp-admin/link-categories.php | 22 +++---- wp-admin/link-manager.php | 69 ++++++++++----------- wp-admin/options.php | 4 +- wp-admin/plugin-editor.php | 2 +- wp-admin/post.php | 4 +- wp-admin/profile.php | 22 +++---- wp-admin/sidebar.php | 2 +- wp-admin/templates.php | 6 +- wp-admin/theme-editor.php | 2 +- wp-admin/user-edit.php | 25 ++++---- wp-admin/users.php | 28 ++++----- wp-comments-popup.php | 2 +- wp-comments.php | 2 +- wp-includes/classes.php | 54 ++++++++-------- wp-includes/functions-formatting.php | 12 ++++ wp-includes/functions-post.php | 4 +- wp-includes/functions.php | 2 +- wp-includes/links.php | 6 +- wp-includes/template-functions-author.php | 4 +- wp-includes/template-functions-category.php | 4 +- wp-includes/template-functions-comment.php | 4 +- wp-includes/template-functions-general.php | 2 +- wp-includes/template-functions-post.php | 6 +- wp-includes/vars.php | 2 +- wp-links-opml.php | 4 +- wp-trackback.php | 4 +- xmlrpc.php | 6 +- 35 files changed, 199 insertions(+), 202 deletions(-) diff --git a/wp-admin/admin-functions.php b/wp-admin/admin-functions.php index 98bee84a74..a0a4d8d999 100644 --- a/wp-admin/admin-functions.php +++ b/wp-admin/admin-functions.php @@ -90,7 +90,7 @@ function write_nested_categories($categories) { foreach($categories as $category) { echo '\n"; + ($category['checked'] ? ' checked="checked"' : ""), '/> ', wp_specialchars($category['cat_name']), "\n"; if(isset($category['children'])) { echo "\n\n"; @@ -113,7 +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); + $category->cat_name = wp_specialchars($category->cat_name); $count = $wpdb->get_var("SELECT COUNT(post_id) FROM $wpdb->post2cat WHERE category_id = $category->cat_ID"); $pad = str_repeat('— ', $level); if ( $user_level > 3 ) @@ -144,7 +144,7 @@ function wp_dropdown_cats($currentcat = 0, $currentparent = 0, $parent = 0, $lev 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); + $category->cat_name = wp_specialchars($category->cat_name); echo "\n\t