From 62b2e5e278fc5cc314d135c078f03d4492cfaf8e Mon Sep 17 00:00:00 2001 From: azaozz Date: Tue, 5 May 2009 07:35:03 +0000 Subject: [PATCH] Escape caption in [gallery] output, props MattyRob, fixes #8763 git-svn-id: http://svn.automattic.com/wordpress/trunk@11200 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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 .= "";