From 6ca8e3b93525a5087019182b20f495a4bb35fd43 Mon Sep 17 00:00:00 2001 From: Andrew Ozz Date: Tue, 5 May 2009 07:35:03 +0000 Subject: [PATCH] Escape caption in [gallery] output, props MattyRob, fixes #8763 git-svn-id: https://develop.svn.wordpress.org/trunk@11200 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/media.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index a7635babf8..ee11a41f29 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -684,7 +684,7 @@ function gallery_shortcode($attr) { if ( $captiontag && trim($attachment->post_excerpt) ) { $output .= " <{$captiontag} class='gallery-caption'> - {$attachment->post_excerpt} + " . wp_specialchars($attachment->post_excerpt) . " "; } $output .= "";