[wp-trac] [WordPress Trac] #14376: admin post.php fails html validation due to use of "[" in name/id/for of hidden custom fields

WordPress Trac wp-trac at lists.automattic.com
Wed Jul 21 07:37:55 UTC 2010


#14376: admin post.php fails html validation due to use of  "[" in name/id/for of
hidden custom fields
--------------------------+-------------------------------------------------
 Reporter:  anmari        |       Owner:                              
     Type:  defect (bug)  |      Status:  new                         
 Priority:  normal        |   Milestone:  Awaiting Review             
Component:  Validation    |     Version:  3.0                         
 Severity:  trivial       |    Keywords:  validation meta customfields
--------------------------+-------------------------------------------------
 Post.php is causing many many html validation errors due to hidden screen
 reader text for post meta fields mainly. Not a major problem, but annoying
 when attempting to validate admin plugin code.

 eg:

 <label class='screen-reader-text' for='meta[1957][key]'>Key</label><input
 name='meta[1957][key]' id='meta[1957][key]' tabindex='6' type='text'
 size='20' value='_wp_geo_latitude' />

 character "[" is not allowed in the value of attribute "id"
 character "[" is not allowed in the value of attribute "for"

 "[" are allowed in the name attribute.  So perhaps one could simply strip
 them out them for the 'id' and the 'for'?

 Other failed validation messages that occur a lot and appear to be wp
 generated code:
 -   ID "_ajax_nonce" already defined
 -   reference to non-existent ID "metakeyselect"

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


More information about the wp-trac mailing list