Make WordPress Core

Opened 4 years ago

Closed 4 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:


#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 4 years ago.
nav_menu_bugfixes.diff (3.3 KB) - added by ptahdunbar 4 years ago.
12864.diff (2.3 KB) - added by ryan 4 years ago.

Download all attachments as: .zip

Change History (6)

ryan4 years ago

comment:1 ryan4 years ago

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

comment:2 ocean904 years ago

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

comment:3 nacin4 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.