Closed (fixed)
Project:
FeedAPI
Version:
6.x-1.5
Component:
Code (general)
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
28 Jan 2009 at 20:50 UTC
Updated:
30 Jul 2009 at 04:24 UTC
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
Comment #1
Krummrey commentedCheck 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.
Comment #2
Se7enLC commentedinput 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?
Comment #3
Se7enLC commentedI 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
Comment #4
Se7enLC commentedI 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.
Comment #5
c-c-m commentedI 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
Comment #6
Brigadier commentedI'm seeing this but I don't have the FeedAPI Inherit module turned on. Still investigating.
Comment #7
Brigadier commentedNot 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.
Comment #8
nevets commentedI 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
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).
Comment #9
ericjam commentedHow related is this to Feed Aggregator? I am having the same problem. PLEASE FIX!!!!
Comment #10
aron novakTake 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.
Comment #12
beyond67 commentedIm having