From 0180091a56a4cabbf961684fc8c587a370ab7cb6 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Sat, 30 Oct 2010 06:14:15 +0000 Subject: [PATCH] Fix nested HTML in submit_button(). fixes #15257, see #15064. git-svn-id: https://develop.svn.wordpress.org/trunk@16097 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/template.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index cf4bb98b2e..37d0e3fbd3 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -2149,12 +2149,11 @@ function get_submit_button( $text = NULL, $type = 'primary', $name = 'submit', $ } // Default the id attribute to $name unless an id was specifically provided in $other_attributes - $id = 'id="' . esc_attr( $name ) . '" '; - if ( is_array( $other_attributes ) && array_key_exists( 'id', $other_attributes ) ) { - $id = 'id="' . esc_attr( $other_attributes['id'] ) . '" '; - } + $id = $name; + if ( is_array( $other_attributes ) && isset( $other_attributes['id'] ) ) + $id = $other_attributes['id']; - $button = ''; if ( $wrap ) {