Hi,
I think I found a bug, or at least a little problem. When using views to display simple feed nodes, and choosing the field : "SimpleFeed Feed Item: Article title", with links, some feeds do not return a working link, because & or & is not converted into &
I made the following simple modification to simplefeed_item_views.inc using str_replace() but I though of letting you know, as there might be a more elegant solution.
/**
* Format a field as a title to the article (possibly as a link)
*/
function views_handler_field_simplefeed_item_title($fieldinfo, $fielddata, $value, $data) {
if ($fielddata['options']) {
// MODIFIED : ADDED THE FOLLOWING TWO LINES
$value = str_replace("&", "&", $value);
$value = str_replace("&", "&", $value);
return l($data->title, $value);
}
else {
return check_plain($data->title);
}
}
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | item_views.patch | 725 bytes | Scott Reynolds |
Comments
Comment #1
boriso commentedoh, well, even drupal parsed correctly the &'s !! So my message would not make sense :
basically
&or&is not converted into &so I added the following piece of code :
Comment #2
mfer commentedInteresting. How are
&or&getting into the database in the first place? Right now, simplefeed grabs either the item or the feed permalink for the url from the simplepie objects.Comment #3
Leeteq commentedSubscribing.
Comment #4
Scott Reynolds commentedya just missing a decode_entities. See patch
Comment #5
m3avrck commentedFixed thanks.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.