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
This commit is contained in:
ryan 2008-08-06 15:49:58 +00:00
parent a5d9355329
commit a5acdddbb7
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 = '';