diff --git a/wp-admin/categories.php b/wp-admin/categories.php
index 7df98f0060..fe428f645e 100644
--- a/wp-admin/categories.php
+++ b/wp-admin/categories.php
@@ -122,10 +122,10 @@ case 'editedcat':
if ($user_level < 3)
die (__('Cheatin’ uh?'));
- $cat_name = addslashes(stripslashes(stripslashes($_POST['cat_name'])));
- $cat_ID = addslashes($_POST['cat_ID']);
+ $cat_name = $wpdb->escape(stripslashes($_POST['cat_name']));
+ $cat_ID = (int) $_POST['cat_ID'];
$category_nicename = sanitize_title($cat_name);
- $category_description = $_POST['category_description'];
+ $category_description = $wpdb->escape(stripslashes($_POST['category_description']));
$wpdb->query("UPDATE $tablecategories SET cat_name = '$cat_name', category_nicename = '$category_nicename', category_description = '$category_description', category_parent = $cat WHERE cat_ID = $cat_ID");
diff --git a/wp-admin/post.php b/wp-admin/post.php
index 32f2de1877..3e403dfb01 100644
--- a/wp-admin/post.php
+++ b/wp-admin/post.php
@@ -756,7 +756,7 @@ function oneclickbookmarklet(blah) {
-
+