Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 17355)
+++ wp-includes/taxonomy.php	(working copy)
@@ -1272,7 +1272,7 @@
 	}
 
 	if ( !empty($search) ) {
-		$search = like_escape($search);
+		$search = esc_sql(like_escape(stripslashes($search)));
 		$where .= " AND (t.name LIKE '%$search%')";
 	}
 
Index: wp-includes/bookmark.php
===================================================================
--- wp-includes/bookmark.php	(revision 17355)
+++ wp-includes/bookmark.php	(working copy)
@@ -181,7 +181,7 @@
 	}
 
 	if ( ! empty($search) ) {
-		$search = like_escape($search);
+		$search = esc_sql(like_escape(stripslashes($search)));
 		$search = " AND ( (link_url LIKE '%$search%') OR (link_name LIKE '%$search%') OR (link_description LIKE '%$search%') ) ";
 	}
 
Index: wp-includes/formatting.php
===================================================================
--- wp-includes/formatting.php	(revision 17355)
+++ wp-includes/formatting.php	(working copy)
@@ -2391,11 +2391,11 @@
  *
  * @since 2.5.0
  *
- * @param string $text The text to be escaped.
- * @return string text, safe for inclusion in LIKE query.
+ * @param string $text The text to be escaped (expected unslashed).
+ * @return string text, NOT safe for inclusion in LIKE query (needs an additional esc_sql()).
  */
 function like_escape($text) {
-	return str_replace(array("%", "_"), array("\\%", "\\_"), $text);
+	return addcslashes($text, '_%\\');
 }
 
 /**
