Opened 8 years ago
Closed 8 years ago
#32342 closed defect (bug) (duplicate)
Ampersand (&) in name breaks custom taxonomy
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.3 |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
Description
Steps to reproduce:
- Create custom taxonomy, for posts - this bug doesn't reproduce with tags. This is the code I was using in my functions.php.
register_taxonomy('series', 'post', array( 'label' => 'Article Series' ));
- Create a custom taxonomy with an ampersand in the name. Not all cases reproduce - the smallest case where I find it works is 'AB&' or 'A B & C D'.
- Try to add the taxonomy to a post, either using quick edit or by using the post edit admin page, then save the post.
- The taxonomy edit fails silently. Any other changes made, like removing an existing taxonomy, will also not register.
It's not a permissions issue - I'm doing this as an administrator. I've traced the bug to get_terms
- running get_terms('series', array('name' => 'AB&' ));
gives me an empty array, at which point it got too frustrating (I traced the bug all the way from edit_post
). The taxonomy still shows up in the taxonomy's admin page table, and you can still access it in the permalink location.
Change History (1)
Note: See
TracTickets for help on using
tickets.
mediumdeviation - Thanks very much for the detailed report. It appears that this is a duplicate of #32248, which has been fixed in trunk. Please verify the fix there, and feel free to reopen if you find that it's not in fact the same issue.