I am using FeedAPI to subscribe to a LiveJournal RSS feed. The feed contains various HTML tags (links and images, mostly) which display fine when looking at the raw feed in firefox.

When using FeedAPI to aggregate, those tags get corrupted. All the < and > characters are being stripped out, so the tags are no longer valid. I've tried changing a LOT of settings, assuming that it was an input format issue. As far as I can tell, I have everything set properly, and no input format should be altering the tags like that (if anything, it should be showing the tag as just text)

Any suggestions?

Comments

Krummrey’s picture

Status: Active » Postponed (maintainer needs more info)

Check your input formats. See if the <img> tag is allowed.
Then it should work, it does for me.

If that doesn't help, try to give more information so that the problem can be reproduced.

Se7enLC’s picture

input formats for what? Here's what I have:

Content Types: feedapi_node, lj_entry

feedapi_node "Feed"
- "feed content type" is checked.
- "feed api node" is checked.
- Node type is "LiveJournal Entry" (lj_entry)

lj_entry "LiveJournal Entry"
- "feed content type" is unchecked
- "feed api node" is unchecked

Content: LiveJournal Feed, Example Entry

LiveJournal Feed (type is feedapi_node)
- input format is filtered HTML ("img" and "a" tags are among the valid tags)

Example Entry (type is lj_entry)
- this is any of the entries that are created when i refresh the feed.
- input format is filtered html, ("img" and "a" tags are among the valid tags)

When viewing an lj_entry node, the tags appear without the < and > characters. When editing the node, those characters are ALSO missing, which tells me that they are disappearing when the entries are imported. Any suggestions?

Se7enLC’s picture

I solved part of my problem. Turns out something was wrong with the node content type. I delete the content types, all the feeds, the created nodes, removed everything with "feedapi" in the name from the database, and the module. When I reinstalled, I now get valid html!

But still no images - at least now the image tags are being cleanly filtered out, rather than just removing the < > characters

Se7enLC’s picture

I recreated the problem:

editing the "feed" content type, if you enable "feedapi inherit", it corrupts the feed (filtering out the < and > characters)

To enable images, I had to edit "allowed HTML tags" under FeedAPi settings NOT under input formats.

c-c-m’s picture

I have the same problem: whenever I want to import a feed such as this one http://www.alvarocarnicero.com/index.rdf which has images and some format, the html tags are just deleted, although I have marked "Allow all HTML tags" to be true under FeedAPI settings (admin/settings/feedapi).

I am using 5.x-1.5 under Drupal 5.19

Brigadier’s picture

I'm seeing this but I don't have the FeedAPI Inherit module turned on. Still investigating.

Brigadier’s picture

Not sure but I think this might be related to this thread on simplepie. I'm using the simplepie parser and getting this problem. According to the thread I linked to it might be a libxml2 bug but I haven't been able to find any confirmation of that yet.

nevets’s picture

I think I know the answer to this, _feedapi_node_save() does not set $node->format, so it defaults to FILTER_FORMAT_DEFAULT which means use the sites default which is typically Strip HTML tags. One could set the site default to Full HTML though I think adding something like

  $node->format = (variable_get('feedapi_allow_html_all', FALSE) ? FILTER_HTML_ESCAPE : FILTER_HTML_STRIP );

to _feedapi_node_save() is more flexible but not perfect.

Better yet would be a per feed Input Filter setting (and get rid of the global html settings).

ericjam’s picture

Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Needs work

How related is this to Feed Aggregator? I am having the same problem. PLEASE FIX!!!!

aron novak’s picture

Status: Needs work » Fixed

Take a look on 1.7 beta1, there is a per-feed and per-content-type setting:
"Input format for feed items:
Choose the input format for feed item nodes created by this feed."
But be aware that the global setting under admin/settings/feedapi is still here.
I do not plan to remove that global setting, keep in mind that there are non-node processors also, so we cannot rely on input formats totally.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

beyond67’s picture

Im having

tags filtered out. I have marked "Allow all HTML tags" to be true under FeedAPI settings (admin/settings/feedapi). Plus I have set my input filter to "Full HTML".