WordPress.org

Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#12864 closed defect (bug) (fixed)

Nav Menus: while item descriptions are strip_tags()'ed, they aren't wptexturize()'d

Reported by: ptahdunbar Owned by: filosofo
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: Menus Keywords: has-patch
Focuses: Cc:

Description

#12544 adds strip_tags() to all item descriptions in the nav menus admin. However the descriptions still leak out if apostrophes are in the content, breaking it out of the hidden input element.

Patch turns the item descriptions and attribute titles into filters and runs both strip_tags() and wptexturize() (which converts plain characters into formatted html entities) on them.

Attachments (3)

wptexturize_nav_menus.diff (2.8 KB) - added by ptahdunbar 11 years ago.
nav_menu_bugfixes.diff (3.3 KB) - added by ptahdunbar 11 years ago.
12864.diff (2.3 KB) - added by ryan 11 years ago.

Download all attachments as: .zip

Change History (6)

@ryan
11 years ago

#1 @ryan
11 years ago

Refreshed patch. Note that get_term_field() runs all of the term_description filters.

#2 @ocean90
11 years ago

  • Keywords has-patch added
  • Owner changed from ptahdunbar to filosofo
  • Status changed from new to assigned

#3 @nacin
11 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [14826]) Properly format menu item title attributes and descriptions. props ryan, fixes #12864.

Note: See TracTickets for help on using tickets.