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);
}
}

CommentFileSizeAuthor
#4 item_views.patch725 bytesScott Reynolds

Comments

boriso’s picture

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);
mfer’s picture

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.

Leeteq’s picture

Subscribing.

Scott Reynolds’s picture

StatusFileSize
new725 bytes

ya just missing a decode_entities. See patch

m3avrck’s picture

Status: Active » Fixed

Fixed thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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