Index: aggregator.module =================================================================== RCS file: /cvs/drupal/drupal/modules/aggregator.module,v retrieving revision 1.253 diff -u -w -b -r1.253 aggregator.module --- aggregator.module 8 Sep 2005 20:08:42 -0000 1.253 +++ aggregator.module 16 Sep 2005 23:51:10 -0000 @@ -532,13 +532,23 @@ foreach ($items as $item) { unset($title, $link, $author, $description); - + /** + * Atom feeds have a CONTENT and/or SUMMARY tag instead of a DESCRIPTION tag + */ + if ($item['CONTENT']) { + $item['DESCRIPTION'] = $item['CONTENT']; + } + else if ($item['SUMMARY']) { + $item['DESCRIPTION'] = $item['SUMMARY']; + } // Prepare the item: foreach ($item as $key => $value) { $value = decode_entities(trim($value)); + if ($key != 'DESCRIPTION') { $value = strip_tags($value, variable_get('aggregator_allowed_html_tags', '
      • ')); $value = preg_replace('/\Wstyle\s*=[^>]+?>/i', '>', $value); $value = preg_replace('/\Won[a-z]+\s*=[^>]+?>/i', '>', $value); + } $item[$key] = $value; } /* @@ -568,16 +578,6 @@ $link = $feed['link']; } - /** - * Atom feeds have a CONTENT and/or SUMMARY tag instead of a DESCRIPTION tag - */ - if ($item['CONTENT']) { - $item['DESCRIPTION'] = $item['CONTENT']; - } - else if ($item['SUMMARY']) { - $item['DESCRIPTION'] = $item['SUMMARY']; - } - /* ** Try to resolve and parse the item's publication date. If no ** date is found, we use the current date instead. @@ -771,6 +771,7 @@ } $output .= theme('table', $header, $rows); + unset($result); $result = db_query('SELECT c.cid, c.title, count(ci.iid) as items FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid GROUP BY c.cid, c.title ORDER BY title'); $output .= '

        '. t('Category overview') .'

        '; @@ -972,6 +973,7 @@ $rows = array(); $categories = array(); while ($item = db_fetch_object($result)) { + $item->description = check_markup($item->description, FILTER_FORMAT_DEFAULT); if ($categorize) { $categories_result = db_query('SELECT c.cid, c.title, ci.iid FROM {aggregator_category} c LEFT JOIN {aggregator_category_item} ci ON c.cid = ci.cid AND ci.iid = %d', $item->iid); if (variable_get('aggregator_category_selector', 'check') == 'select') {