Switch to a CSS comment in gallery_shortcode() to avoid breaking markup when the shortcode is used inside an HTML comment. props mark-k, aaroncampbell. fixes #23787.

git-svn-id: http://core.svn.wordpress.org/trunk@24329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2013-05-22 22:27:53 +00:00
parent f17d4bf90f
commit 71b6d68ad5

View File

@ -770,8 +770,8 @@ function gallery_shortcode($attr) {
#{$selector} .gallery-caption {
margin-left: 0;
}
</style>
<!-- see gallery_shortcode() in wp-includes/media.php -->";
/* see gallery_shortcode() in wp-includes/media.php */
</style>";
$size_class = sanitize_html_class( $size );
$gallery_div = "<div id='$selector' class='gallery galleryid-{$id} gallery-columns-{$columns} gallery-size-{$size_class}'>";
$output = apply_filters( 'gallery_style', $gallery_style . "\n\t\t" . $gallery_div );