links to original feeds in views
| Project: | SimpleFeed |
| Version: | 5.x-2.2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
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);
}
}

#1
oh, 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 :
$value = str_replace("&", "&", $value);$value = str_replace("&", "&", $value);
#2
Interesting. 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.#3
Subscribing.
#4
ya just missing a decode_entities. See patch
#5
Fixed thanks.
#6
Automatically closed -- issue fixed for two weeks with no activity.