WordPress.org

Make WordPress Core

Changeset 16097


Ignore:
Timestamp:
10/30/2010 06:14:15 AM (9 years ago)
Author:
nacin
Message:

Fix nested HTML in submit_button(). fixes #15257, see #15064.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r16061 r16097  
    21502150   
    21512151    // Default the id attribute to $name unless an id was specifically provided in $other_attributes
    2152     $id = 'id="' . esc_attr( $name ) . '" ';
    2153     if ( is_array( $other_attributes ) && array_key_exists( 'id', $other_attributes ) ) {
    2154         $id = 'id="' . esc_attr( $other_attributes['id'] ) . '" ';
    2155     }
     2152    $id = $name;
     2153    if ( is_array( $other_attributes ) && isset( $other_attributes['id'] ) )
     2154        $id = $other_attributes['id'];
    21562155   
    2157     $button = '<input type="submit" name="' . esc_attr( $name ) . '" id="' . $id . '" class="' . esc_attr( $class );
     2156    $button = '<input type="submit" name="' . esc_attr( $name ) . '" id="' . esc_attr( $id ) . '" class="' . esc_attr( $class );
    21582157    $button .= '" value="' . esc_attr( $text ) . '" ' . $attributes . ' />';
    21592158   
Note: See TracChangeset for help on using the changeset viewer.