[wp-trac] [WordPress Trac] #33940: Double spaces in term names can cause problems
WordPress Trac
noreply at wordpress.org
Sun Sep 20 22:56:06 UTC 2015
#33940: Double spaces in term names can cause problems
--------------------------+-----------------------------
Reporter: smerriman | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: XML-RPC | Version: trunk
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Create a tag called 'test term'.
Use XML-RPC to create a post with a tag of:
{{{
test term
}}}
(two spaces). You'll get an error thrown, with the post not created:
{{{
A term with the name already exists in this taxonomy
}}}
This appears to be due to the `_insert_post` function in XML-RPC using
`get_term_by( 'name', $term_name, $taxonomy );`, which is returning false
- thus it tries to create the term as new, and fails.
Most other aspects of WP seem to filter the term name to strip double
spaces first - is that what is necessary here? Or could the issue affect
more than just XML-RPC?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33940>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list