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 10 Sep 2005 12:13:48 -0000 @@ -534,13 +534,24 @@ unset($title, $link, $author, $description); // Prepare the item: + // 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']; + } foreach ($item as $key => $value) { + if ($key == 'DESCRIPTION') { + break; + } $value = decode_entities(trim($value)); $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; } + /* ** Resolve the item's title. If no title is found, we use ** up to 40 characters of the description ending at a word @@ -568,16 +579,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 +772,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 +974,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') {