HTML tags (e.g. from Google Alerts) are shown in the results of a feed imported by aggregator.
This is shown as
'Het bijtellen van extra tijd is aan de <b>scheidsrechter</b>'
In Drupal 7, the same problem exists as described in http://drupal.org/node/311511. I have created a different issue, because the problem was solved for the 6.x-version.
Any help would be appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | feeds.png | 15.91 KB | edvanleeuwen |
Comments
Comment #1
edvanleeuwenIt seems that this can be resolved by combining the 6.x version solutions.
In aggregator.parser.inc, function aggregator_parse_feed, replace
by
I am not sure whether this causes any side-effects, but for now I am happy with it.
Comment #2
FSMDrupal commentedThis worked in Drupal 7 for me. This is similar to another post I saw but this one includes the 'strip_tags' which seemed to be key to this working.
Thanks
Comment #3
edvanleeuwenCan anyone help me with getting this into the mainstream files?
Comment #4
David_Rothstein commentedThere is no patch here.
Comment #5
David_Rothstein commentedIn any case, it's not 100% clear if this is about the titles or content of the feed items, but:
Either way, I can't reproduce any issue with quotes getting escaped (as in the original example above,
'Het bijtellen van extra tijd is aan de <b>scheidsrechter</b>'), just HTML tags.Finally, if there were a place to change this, it would probably be in the theme preprocess layer? See this code from aggregator.pages.inc:
This shows how the title and content are processed differently before they are displayed.
Comment #6
edvanleeuwenThanks for you reply, David.
It is for the titles. I have attached a screenshot of two blocks which shows the results of a feed of the KNVB.nl website and one from Google Alert:

This is something I get when adding an atom or RSS feed from Google Alert. It is not something I have control over myself.
I cannot say, I am no expert on this, unfortunately.
If you feel that this is something which is not going to be incorporated into the mainstream, it is fine with me. I am quite happy with the solution described above, although I have to apply it every time core is updated.
Comment #7
edvanleeuwenDeclared duplicate: https://drupal.org/node/61456