sanitize the value, not the field. Props cavemonkey50. fixes #4651

git-svn-id: http://svn.automattic.com/wordpress/trunk@5865 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2007-08-14 02:46:06 +00:00
parent 74fcc19b8e
commit 7c1ce10fae

View File

@ -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 ) {