[wp-trac] [WordPress Trac] #13039: HTML validation broken when plugin adds a menu title such as "Foo & Bar"

WordPress Trac wp-trac at lists.automattic.com
Sun Apr 18 03:37:25 UTC 2010


#13039: HTML validation broken when plugin adds a menu title such as "Foo & Bar"
----------------------------+-----------------------------------------------
 Reporter:  dd32            |       Owner:     
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  3.0
Component:  Administration  |     Version:  3.0
 Severity:  normal          |    Keywords:     
----------------------------+-----------------------------------------------
 HTML validation is currently broken when a plugin adds a menu title such
 as "Foo & Bar".

 The & is not escaped in the menu output.

 The options i came up with are:
  * HTML Escape the titles on output
    * Problem: Title may contain HTML (such as comments and plugin bubbles)
  * HTML Escape the titles upon adding them in add_menu_page()
    * Problem: Breaks any plugins adding HTML through it
  * wptexturize() the menu titles on output

 The last seems to work correctly for me.

 We've currently got "Authors & Users" hard coded in, this changes that
 simply to "Authors & Users" as well.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/13039>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list