### Eclipse Workspace Patch 1.0
#P WordPressDev
Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 11148)
+++ wp-includes/taxonomy.php	(working copy)
@@ -844,7 +844,7 @@
  *
  * @uses $wpdb
  *
- * @param int|string $term The term to check
+ * @param int|string $term The term to check (assumed not stripslashed)
  * @param string $taxonomy The taxonomy name to use
  * @param int $parent ID of parent term under which to confine the exists search.
  * @return mixed Get the term id or Term Object, if exists.
@@ -865,6 +865,8 @@
 			return $wpdb->get_var( $wpdb->prepare( $select . $where, $term ) );
 	}
 
+        $term = trim( stripslashes( $term ));
+    
 	if ( '' === $slug = sanitize_title($term) )
 		return 0;
 

