WordPress 4.3.1
[autoinstalls/wordpress.git] / wp-includes / media.php
index 95bbca732e46d42c9a867d5c3f9c418380e4da4f..49d1717c2d7377ad498162f5e9a026ece97d26f9 100644 (file)
@@ -863,6 +863,8 @@ function img_caption_shortcode( $attr, $content = null ) {
                        $content = $matches[1];
                        $attr['caption'] = trim( $matches[2] );
                }
+       } elseif ( strpos( $attr['caption'], '<' ) !== false ) {
+               $attr['caption'] = wp_kses( $attr['caption'], 'post' );
        }
 
        /**