Ticket #7559 (new defect (bug))

Opened 5 months ago

Last modified 1 month ago

strip_tags() breaks category names with left angle brackets

Reported by: squirreling Assigned to: ryan
Priority: high Milestone: 2.7.1
Component: Taxonomy Version: 2.6
Severity: minor Keywords: category, bracket, special character, has-patch, needs-testing
Cc:

Description

If you create a category named "<something", the category name doesn't show up on any of the category listings. If you create a category named "some<thing" the category name shows up as "some".

Attachments

7559.diff (1.3 kB) - added by slushpilejs on 11/12/08 14:41:23.
rescued lone less than sign in pre_term_name from strip_tags(), separated out pre_term_name filters

Change History

10/14/08 01:34:52 changed by matt

  • priority changed from low to high.

10/14/08 02:53:04 changed by ryan

strip_tags() is the culprit

10/22/08 23:55:33 changed by ryan

  • owner deleted.
  • component changed from General to Taxonomy.

11/12/08 11:32:08 changed by rmccue

  • summary changed from creating a category name starting with a less than angle bracket causes category name not to show up to strip_tags() breaks category names with left angle brackets.

11/12/08 14:41:23 changed by slushpilejs

  • attachment 7559.diff added.

rescued lone less than sign in pre_term_name from strip_tags(), separated out pre_term_name filters

11/12/08 14:50:04 changed by slushpilejs

  • keywords changed from category, bracket, special character to category, bracket, special character, has-patch, needs-testing.
  • owner set to slushpilejs.
  • status changed from new to assigned.

11/18/08 13:57:59 changed by mattyrob

Will this patch also work for lone greater than symbols?

Maybe we should HTML encode them both (&lt; and &gt;) in category names.

11/18/08 17:15:37 changed by slushpilejs

  • owner changed from slushpilejs to ryan.
  • status changed from assigned to new.

Yes, wp_specialchars encodes the lone greater than symbol. This merely dodges the broken behaviour of strip_tags.

12/10/08 23:59:21 changed by DD32

  • milestone changed from 2.7 to 2.7.1.