WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 7 months ago

#33940 assigned defect (bug)

Double spaces in term names can cause problems

Reported by: smerriman Owned by: boonebgorges
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: XML-RPC Keywords: needs-patch
Focuses: Cc:

Description

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?

Change History (3)

#1 @wonderboymusic
3 years ago

  • Owner set to boonebgorges
  • Status changed from new to assigned

#2 @obenland
3 years ago

  • Version trunk deleted

#3 @desrosj
7 months ago

  • Keywords needs-patch added
Note: See TracTickets for help on using tickets.