From a5acdddbb78d0f2e555c69cc294223501e485b8d Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 6 Aug 2008 15:49:58 +0000 Subject: [PATCH] Strip tags from summary. Props dsader. fixes #7375 for trunk git-svn-id: http://svn.automattic.com/wordpress/trunk@8567 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/widgets.php | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php index f1fafab43e..2a71a02153 100644 --- a/wp-includes/widgets.php +++ b/wp-includes/widgets.php @@ -1125,18 +1125,11 @@ function wp_widget_rss_output( $rss, $args = array() ) { if ( empty($title) ) $title = __('Untitled'); $desc = ''; - if ( isset( $item['description'] ) && is_string( $item['description'] ) ) - $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['description'], ENT_QUOTES)))); - elseif ( isset( $item['summary'] ) && is_string( $item['summary'] ) ) - $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['summary'], ENT_QUOTES)))); - $summary = ''; if ( isset( $item['description'] ) && is_string( $item['description'] ) ) - $summary = $item['description']; + $desc = $summary = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['description'], ENT_QUOTES)))); elseif ( isset( $item['summary'] ) && is_string( $item['summary'] ) ) - $summary = $item['summary']; - - $desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($summary, ENT_QUOTES)))); + $desc = $summary = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['summary'], ENT_QUOTES)))); if ( $show_summary ) { $desc = '';