By mkogel on
I have enabled the Aggregator Module and created various categories and feeds from Google Alerts.
1) See output on this link
http://montyscorner.org/aggregator/categories
You will see that the news teasers show HTML tags. The XML feed contains html tags but Aggerator Module is not rendering as HTML.
How can I avoid it? It looks really ugly.
Thanks in advance
Comments
answer lies in aggregator.module
After searching long for answers I found the issue being discussed in this link.
http://drupal.org/node/311511
The solution suggested in #20 seems to be working. It cleans up the HTML tags from the title.
However, the remaining issue is the special characters which are not displayed properly.
I am not a developer so I need idiots guide sometimes
answer indeed lies in aggregator.module - ' problem resolved
OK, after a painful search for PHP functions (I am not a coder and do not understand much however I can copy examples) it looks like I have resolved the ' problem. I believe that with this solution all special characters will show normal.
Google Alert XML contains this in the title tag
Nature's <b>Child</b> Blog - Wholesome Ideas for Mothers and Babies:Strip-tags() function nicely removes the html tags before they are inserted into the database.
Now I have made the following adjustment in the xml_parser_free($xml_parser); function starting in line 722.
into this one
This way the title is decoded of speacial characters.
Ok, as a newbie, am I good or good. I hope that this is the end of aggregator issues.
I am not a developer so I need idiots guide sometimes
that worked great for me.
that worked great for me. Thank you very much!
nice job!
That was an awesome quick fix for a core module problem! (though I guess it's more Google's problem than the module's)
Thanks!
Worked for me! :)
Didn't work but found solution
This didnt work on Drupal 7 for me but it was close to what worked which I found at http://drupal.org/node/1805278
the key is the missing strip_tags.
Thus In aggregator.parser.inc, function aggregator_parse_feed, replace
// Resolve the item's title. If no title is found, we use up to 40
// characters of the description ending at a word boundary, but not
// splitting potential entities.
if (!empty($item['title'])) {
$item['title'] = $item['title'];
}
with
/// Resolve the item's title. If no title is found, we use up to 40
// characters of the description ending at a word boundary, but not
// splitting potential entities.
if (!empty($item['title'])) {
$item['title'] = html_entity_decode(stI replaced it with
if (!empty($item['title'])) {
$item['title'] = html_entity_decode(strip_tags($item['title']), ENT_QUOTES, "utf-8");
}