Ensure the caption shortcode outputs a valid HTML ID.
fixes #33179. git-svn-id: https://develop.svn.wordpress.org/trunk@33489 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dbcb95c022
commit
6b1733c01c
@ -896,7 +896,7 @@ function img_caption_shortcode( $attr, $content = null ) {
|
||||
return $content;
|
||||
|
||||
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'] );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user