Drupal module Feed Aggregator escapes HTML tags in feeds
January 18, 2009
PHP | Troubleshooting

Drupal's Feed aggregator has a problem displaying some of the escaped tags in Google Alerts Feeds. For example, see the screenshot below:

Picture 31.jpeg



The fix is to alter the code in
modules/aggregator/aggregator.module

Search for


function aggregator_save_item($edit)

In both the UPDATE statement and the INSERT statement:

replace $edit['title']
with
strip_tags($edit['title'])

Ads by Google

Posted by ellen at January 18, 2009 10:27 PM


The words "strip_tags" are colored green in the image below, to make it easier to see the exact spots that need editing:
Picture 30.jpeg

After the fix, the feed looks like this:
Picture 33fixed.jpeg

Note: You may want to put the edited copy of this module into the sites/modules folder so it will not be overwritten by the next update of Drupal.

Many thanks to Manjeet in the Drupal forums for this tip.


Ads by Google

1 Comment

Thank you! we were having trouble with ugly tags in the titles of RSS feeds from PLOS (Public Library of Science) and this suggestion stripped out the escaped unwanted html tags.


Ads by Google

 RSS   |   Contact Me


Ads by Google