[wp-trac] [WordPress Trac] #17409: Entity & in menu title breaks XHTML 1.0 Strict validation
WordPress Trac
noreply at wordpress.org
Fri Feb 21 19:02:17 UTC 2014
#17409: Entity & in menu title breaks XHTML 1.0 Strict validation
--------------------------+----------------------
Reporter: Florat | Owner: Florian
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Menus | Version: 3.1.2
Severity: normal | Resolution: invalid
Keywords: | Focuses:
--------------------------+----------------------
Changes (by ocean90):
* keywords: close =>
* milestone: Awaiting Review =>
Comment:
Replying to [comment:3 Steve_p]:
>When using $menu_item->menu_title directly, you need to use esc_html() to
encode HTML entities correctly.
Or, as `wp_nav_menu()` and his Walker, do `apply_filters( 'the_title',
$menu_item->menu_title, $menu_item->ID )`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/17409#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list