[wp-trac] [WordPress Trac] #32248: adding a term containing "&" and renamed

WordPress Trac noreply at wordpress.org
Fri Jul 3 20:19:08 UTC 2015


#32248: adding a term containing "&" and renamed
----------------------------+-----------------------------
 Reporter:  olivM           |       Owner:  boonebgorges
     Type:  defect (bug)    |      Status:  reopened
 Priority:  normal          |   Milestone:  4.3
Component:  Administration  |     Version:  4.0
 Severity:  normal          |  Resolution:
 Keywords:  has-patch       |     Focuses:  administration
----------------------------+-----------------------------

Comment (by boonebgorges):

 matthewmi11er - Can you give more details on how to reproduce what you're
 describing? `term_exists()` is a low-level function. Character encoding
 should be handled by the function that calls `term_exists()`, and
 `term_exists()` ought to trust what's passed to it. Making things more
 complicated, the `$term` passed to `term_exists()` is checked against both
 the 'name' and the 'slug' columns, and the same sanitization can't be
 performed for both. That being said, `term_exists()` does do some
 sanitization of slugs (`sanitize_title()`). In short: it's a mess, and I
 don't recommend using it - use `get_term_by()` instead.

 All of this is a roundabout way of saying that I'd like to avoid touching
 `term_exists()` unless it's resulting in real-life problems. I'm pretty
 sure that the bug described in this ticket doesn't touch `term_exists()`.
 Do you have a specific demonstration in mind? If not, and this is just a
 general point about `term_exists()`, let's open a separate ticket so we
 can clear out the milestone.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32248#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list