[wp-trac] [WordPress Trac] #24354: get_cat_id() fails with category names containing ampersand

WordPress Trac noreply at wordpress.org
Fri May 17 08:25:08 UTC 2013


#24354: get_cat_id() fails with category names containing ampersand
--------------------------+----------------------------------------
 Reporter:  Kenshino      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Taxonomy      |    Version:  3.5.1
 Severity:  normal        |   Keywords:  needs-testing dev-feedback
--------------------------+----------------------------------------
 {{{
 echo get_cat_id('News');
 results in 3 (as expected);
 echo get_cat_id('Test OtherName');
 results in 8 (as expected);
 echo get_cat_id('Test&OtherName');
 Results in 0
 echo get_cat_id('News & Media');
 Results in 0
 }}}

 All the category names were created in the Category Edit page, category
 names were copied from the text box directly into the code to allow no
 formatting issues.

 I tracked the code to get_term_by and I think the ampersand in category
 name screws up possibly after being added into the prepared SQL statement.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/24354>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list