Ensure the caption shortcode outputs a valid HTML ID.

fixes #33179.

Built from https://develop.svn.wordpress.org/trunk@33489


git-svn-id: http://core.svn.wordpress.org/trunk@33456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Helen Hou-Sandí 2015-07-29 17:59:24 +00:00
parent bf9d1485ee
commit d22adb0d6e
2 changed files with 2 additions and 2 deletions

View File

@ -896,7 +896,7 @@ function img_caption_shortcode( $attr, $content = null ) {
return $content; return $content;
if ( ! empty( $atts['id'] ) ) if ( ! empty( $atts['id'] ) )
$atts['id'] = 'id="' . esc_attr( $atts['id'] ) . '" '; $atts['id'] = 'id="' . esc_attr( sanitize_html_class( $atts['id'] ) ) . '" ';
$class = trim( 'wp-caption ' . $atts['align'] . ' ' . $atts['class'] ); $class = trim( 'wp-caption ' . $atts['align'] . ' ' . $atts['class'] );

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.3-beta4-33488'; $wp_version = '4.3-beta4-33489';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.