summaryrefslogtreecommitdiff
path: root/modules/aggregator.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-04-07 22:46:55 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-04-07 22:46:55 +0000
commit0f41706acc230a03e241b302d46b552e801770d0 (patch)
tree330ccc004aed92b4f73af2fafc2f83f998f5c01e /modules/aggregator.module
parent7d3d5532dfb93d1ed9e04b64e2576312591f1f28 (diff)
downloadbrdo-0f41706acc230a03e241b302d46b552e801770d0.tar.gz
brdo-0f41706acc230a03e241b302d46b552e801770d0.tar.bz2
- #19874: Fix aggregator escaping after check_plain bug
- Fix bug in decode_entities() with double-escaped entities.
Diffstat (limited to 'modules/aggregator.module')
-rw-r--r--modules/aggregator.module8
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/aggregator.module b/modules/aggregator.module
index 51acc9374..0d7601db3 100644
--- a/modules/aggregator.module
+++ b/modules/aggregator.module
@@ -468,10 +468,6 @@ function aggregator_parse_feed(&$data, $feed) {
}
xml_parser_free($xml_parser);
- // initialize the translation table:
- $tt = array_flip(get_html_translation_table(HTML_SPECIALCHARS));
- $tt['&apos;'] = "'";
-
/*
** We reverse the array such that we store the first item last,
** and the last item first. In the database, the newest item
@@ -486,7 +482,7 @@ function aggregator_parse_feed(&$data, $feed) {
// Prepare the item:
foreach ($item as $key => $value) {
// TODO: Make handling of aggregated HTML more flexible/configurable.
- $value = strtr(trim($value), $tt);
+ $value = decode_entities(trim($value));
$value = strip_tags($value, '<a> <b> <br> <dd> <dl> <dt> <em> <i> <li> <ol> <p> <strong> <u> <ul>');
$value = preg_replace('/\Wstyle\s*=[^>]+?>/i', '>', $value);
$value = preg_replace('/\Won[a-z]+\s*=[^>]+?>/i', '>', $value);
@@ -1112,7 +1108,7 @@ function theme_aggregator_page_item($item) {
$output .= " <div class=\"body\">\n";
$output .= ' <div class="title"><a href="'. check_url($item->link) .'">'. check_plain($item->title) ."</a></div>\n";
if ($item->description) {
- $output .= ' <div class="description">'. check_plain($item->description) ."</div>\n";
+ $output .= ' <div class="description">'. $item->description ."</div>\n";
}
if ($item->ftitle && $item->fid) {
$output .= ' <div class="source">'. t('Source') .': '. l($item->ftitle, "aggregator/sources/$item->fid") ."</div>\n";