From 07bd0bd9cff0dcf20f179dec63719404fa970aac Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Wed, 6 Aug 2008 15:49:58 +0000 Subject: [PATCH] Strip tags from summary. Props dsader. fixes #7375 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@8567 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 = '';