[wp-trac] [WordPress Trac] #17689: Terms should not be sanitized inside term_exists()

WordPress Trac noreply at wordpress.org
Thu Sep 19 14:38:12 UTC 2013


#17689: Terms should not be sanitized inside term_exists()
--------------------------------------------------+------------------
 Reporter:  blepoxp                               |       Owner:
     Type:  defect (bug)                          |      Status:  new
 Priority:  high                                  |   Milestone:  3.7
Component:  Taxonomy                              |     Version:  3.2
 Severity:  normal                                |  Resolution:
 Keywords:  has-patch needs-unit-tests 3.7-early  |
--------------------------------------------------+------------------

Comment (by wonderboymusic):

 [attachment:17689.5.diff​ 17689.5.diff​] may seem ridiculous, but it
 totally fixes 2 issues:

 1. Fixes the problem where currently you can add `$$$` repeatedly

 2. Fixes the problem where items with `+` and `-` get added repeatedly

 *added repeatedly* means many terms with the same name and different
 slugs, due to `sanitize_title_with_dashes()`.

 `wp_humanize_plus_minus()` is the utility function I added that calls
 itself recursively to convert `+/-` to `plus/minus` in specifically-
 matched cases.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/17689#comment:21>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list