From ebf9ab90b69163dbf022348084f71f6fa69e12bc Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 14 Aug 2007 02:46:06 +0000 Subject: [PATCH] sanitize the value, not the field. Props cavemonkey50. fixes #4651 git-svn-id: https://develop.svn.wordpress.org/trunk@5865 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/taxonomy.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/taxonomy.php b/wp-includes/taxonomy.php index 8c842c313b..02d6da3367 100644 --- a/wp-includes/taxonomy.php +++ b/wp-includes/taxonomy.php @@ -132,7 +132,7 @@ function get_term_by($field, $value, $taxonomy, $output = OBJECT) { if ( 'slug' == $field ) { $field = 't.slug'; - $value = sanitize_title($field); + $value = sanitize_title($value); if ( empty($value) ) return false; } else if ( 'name' == $field ) {