[wp-trac] [WordPress Trac] #18606: wp_insert_term and wp_create_category fail on diacritics names

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 6 20:21:20 UTC 2011


#18606: wp_insert_term and wp_create_category fail on diacritics names
--------------------------------+-----------------------------
 Reporter:  abdessamad idrissi  |      Owner:
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Taxonomy            |    Version:  3.2.1
 Severity:  major               |   Keywords:
--------------------------------+-----------------------------
 To create a category with the name
 {{{
 Ḍ
 }}}
 using either wp_insert_term or wp_create_category, an HTML entity
 representing the character must be given;
 so this won't work :

 {{{
 wp_create_category( 'Ḍ' );
 wp_insert_term( 'Ḍ' );
 }}}

 but this will work

 {{{
 wp_insert_term( mb_strtolower('Ḍ'), 'category',  array( 'slug' =>
 html_entity_decode('Ḍ', ENT_QUOTES, 'UTF-8') ) );
 }}}

 What is strange is when the category is created using the admin panel it
 works with the original diacritics name,

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


More information about the wp-trac mailing list