id summary reporter owner description type status priority milestone component version severity resolution keywords cc focuses 50294 Ampersand and other symbols in term_exists do not get encoded properly SeBsZ "When calling term_exists as follows: {{{ $matchingterms = term_exists('Nice Hotels & Apartments, 'customtaxonomy', 0); }}} I noticed the resulting term name query looks like this: {{{ SELECT tt.term_id, tt.term_taxonomy_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id WHERE t.NAME = 'Nice Hotels & Apartments' AND tt.parent = 0 AND tt.taxonomy = 'customtaxonomy' ORDER BY t.term_id ASC LIMIT 1 }}} This then fails to return any results even though it is in the database. But in the database the ampersand is encoded &: wp_terms: term_id | name | slug 11851 | Nice Hotels & Apartments | nice-hotels-apartments-different-slug My code then decides the term does not exist yet, but creation of a new term using wp_insert_term with the same term name ""Nice Hotels & Apartments"" then fails (correctly) with the message ""A term with the name provided already exists in this taxonomy."" I believe the behavior between the two functions term_exists and wp_insert_term is not consistent. Can someone take a look at this?" defect (bug) new normal Awaiting Review Taxonomy 5.4.1 normal