Opened 12 years ago
Closed 12 years ago
#23273 closed defect (bug) (duplicate)
function wp_nonce_field should randomize id attribute
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Validation | Keywords: | |
Focuses: | Cc: |
Description
The wp_nonce_field function in wp-includes/functions.php should use a random seed for the id attribute of the field. In cases where there are pages or posts with multiple forms, each nonce hidden field has the same id attribute. This causes the w3c Markup Validation Service to site an error "Duplicate ID _wpnonce."
Another solution could be to simply omit the id attribute all together.
See code here http://core.trac.wordpress.org/browser/tags/3.5/wp-includes/functions.php
The function simply uses the name of the field as the id attribute.
Change History (1)
Note: See
TracTickets for help on using
tickets.
Duplicate of #23165.