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
This commit is contained in:
Ryan Boren 2008-08-06 15:49:58 +00:00
parent 88b7cfe735
commit 07bd0bd9cf
1 changed files with 2 additions and 9 deletions

View File

@ -1125,18 +1125,11 @@ function wp_widget_rss_output( $rss, $args = array() ) {
if ( empty($title) ) if ( empty($title) )
$title = __('Untitled'); $title = __('Untitled');
$desc = ''; $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 = ''; $summary = '';
if ( isset( $item['description'] ) && is_string( $item['description'] ) ) 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'] ) ) elseif ( isset( $item['summary'] ) && is_string( $item['summary'] ) )
$summary = $item['summary']; $desc = $summary = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($item['summary'], ENT_QUOTES))));
$desc = str_replace(array("\n", "\r"), ' ', attribute_escape(strip_tags(html_entity_decode($summary, ENT_QUOTES))));
if ( $show_summary ) { if ( $show_summary ) {
$desc = ''; $desc = '';