Resource icon

RSS Feed Importer 1.4

No permission to download

Basti

Administrator
Staff member
Please have a look at the member in admin and see what the rss url is for that member where error happens. Might be invalid rss url, or rss feed can not parse something.

Let us know the rss url also so we could test
 

autosurf

Active Member
i change in details_compile_details.php if no link or no title in the feed
and i have add "htmlspecialchars_decode" to rss_title and rss_desc if spécial caractere exist (ex : "'")

$TMPL['rss_link'] = isset($item['link']) ? $item['link'] : '';
$TMPL['rss_title'] = isset($item['title']) ? $item['title'] : '';
$TMPL['rss_title'] = htmlspecialchars_decode($TMPL['rss_title']);
$TMPL['rss_desc'] = isset($item['description']) ? $item['description'] : '';
$TMPL['rss_desc'] = htmlspecialchars_decode($TMPL['rss_desc']);
 

Basti

Administrator
Staff member
Why decode? We already making special characters save to be used inside html, you effectively removing that security with decode
 

autosurf

Active Member
yes, you are right, my problem came from a flow which was badly formatted and certain characters and apostrophes were not displayed but coded. sorry for my mistake: /
 

Basti

Administrator
Staff member
Ah i see, so they already came encoded from the feed, then we encoded them again is what you saying?

can you try this instead and see if that fixes the issues also for the member in question?
Find this bit
Code:
        $item = array_map(function($value) {
            return htmlspecialchars(strip_tags($value), ENT_QUOTES, "UTF-8");
        }, $item);
and replace with
Code:
        $item = array_map(function($value) {
            return htmlspecialchars(strip_tags(htmlspecialchars_decode($value)), ENT_QUOTES, "UTF-8");
        }, $item);
 

autosurf

Active Member
The original coding was carried out with the function:

$description = utf8_htmlspecialchars (utf8_htmlspecialchars (utf8_substr ($site ['description'], 0, 255)));

with

function utf8_htmlspecialchars ($string)
{
return htmlspecialchars ($string, ENT_QUOTES, 'UTF-8');
}
In fact, it performs 2 times the encoding for the same area ???

An error in this script, which is however widely used, it is the Arfooo script (directory)

My tests were carried out with the Arfooo feed on one of my directories, so I corrected the problem upstream.

$description = utf8_htmlspecialchars (utf8_substr ($site ['description'], 0, 255));
For the Visiolist part, it works well (gg to developers)
I keep your piece of code in stock just in case!
not easy to manage things that come from outside like flows or others!

Thank you for your perseverance :)
 
Top