diff --git a/wp-includes/media.php b/wp-includes/media.php index 7bfda66f1c..24c370769d 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1589,11 +1589,29 @@ function img_caption_shortcode( $attr, $content = null ) { } if ( $html5 ) { - $html = '
' - . do_shortcode( $content ) . '
' . $atts['caption'] . '
'; + $html = sprintf( + '
%s%s
', + $atts['id'], + $style, + esc_attr( $class ), + do_shortcode( $content ), + sprintf( + '
%s
', + $atts['caption'] + ) + ); } else { - $html = '
' - . do_shortcode( $content ) . '

' . $atts['caption'] . '

'; + $html = sprintf( + '
%s%s
', + $atts['id'], + $style, + esc_attr( $class ), + do_shortcode( $content ), + sprintf( + '

%s

', + $atts['caption'] + ) + ); } return $html; diff --git a/wp-includes/version.php b/wp-includes/version.php index 431f3ed15c..72138c14a1 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42689'; +$wp_version = '5.0-alpha-42690'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.