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

WordPress Trac wp-trac at lists.automattic.com
Fri Sep 28 21:56:54 UTC 2012


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

Comment (by phill_brown):

 Another scenario this affects:

 1. Create a tag called 'A' - the slug should default to 'a'
 2. Add/edit a post.
 3. In the tags box add 'A' to the post, and also 'A-'
 4. Update the post.

 'A' will assign as expected but 'A-' will be discarded instead of added as
 a new tag.

 santitize_title() will strip out the hyphen in 'A-' and match the slug
 against 'A'. The same behaviour would apply to any use case where a new
 tag name matched the slug of an existing tag.

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


More information about the wp-trac mailing list