Make WordPress Core

Changeset 33489


Ignore:
Timestamp:
07/29/2015 05:58:06 PM (9 years ago)
Author:
helen
Message:

Ensure the caption shortcode outputs a valid HTML ID.

fixes #33179.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r33025 r33489  
    897897
    898898    if ( ! empty( $atts['id'] ) )
    899         $atts['id'] = 'id="' . esc_attr( $atts['id'] ) . '" ';
     899        $atts['id'] = 'id="' . esc_attr( sanitize_html_class( $atts['id'] ) ) . '" ';
    900900
    901901    $class = trim( 'wp-caption ' . $atts['align'] . ' ' . $atts['class'] );
Note: See TracChangeset for help on using the changeset viewer.