Published Articles RSS feed does not display some caracters

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
User avatar
Monfreid
Bear Rating Trainee
Bear Rating Trainee
Posts: 23
Joined: 04 Apr 2013, 18:16

Re: Published Articles RSS feed does not display some caract

Postby Monfreid » 29 Apr 2013, 16:43

fox wrote:Give donation to simplepie developers so their feed library would stop fucking up the content on import. Read the FAQ entry one. In red.


ok, fair enough. Thanks
I have reported the issue to them and hopefully they will fix it and that will be beneficial to many and not just me :-)

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Published Articles RSS feed does not display some caract

Postby fox » 29 Apr 2013, 17:00

https://github.com/gothfox/Tiny-Tiny-RS ... a99a1d1a2f

This is very much experimental and may break things.

User avatar
Monfreid
Bear Rating Trainee
Bear Rating Trainee
Posts: 23
Joined: 04 Apr 2013, 18:16

Re: Published Articles RSS feed does not display some caract

Postby Monfreid » 30 Apr 2013, 13:32

Thanks for this Fox, I will try this fix and hopefully it will fix my problem :-)

Athanasius
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 02 Apr 2013, 21:01

Re: Published Articles RSS feed does not display some caract

Postby Athanasius » 01 May 2013, 16:31

fox wrote:https://github.com/gothfox/Tiny-Tiny-RSS/commit/39ede9862f1df94b24cbe476ec66eca99a1d1a2f

This is very much experimental and may break things.

I've just run into a problem that might be related to this. I first saw this at commit e57a1507aeb349c9ba7d673048c5ccb43e2d639b but to be sure I wasn't reporting something already fixed just updated to 7fc041c6ef2241d0611afb60fb721568376cd723 and still see the issue.

Feed: http://syndication.thedailywtf.com/TheDailyWtf

Look at the current latest article:

Code: Select all

                        <author>Erik Gern</author>
                        <title>CodeSOD: Re-Inventing the Alphabet</title>
                        <link>http://thedailywtf.com/Articles/ReInventing-the-Alphabet.aspx</link>
                        <category>CodeSOD</category>
                        <pubDate>Wed, 01 May 2013 10:30:00 GMT</pubDate>


it contains a code snippet with a for loop that contains a less-than character:

Code: Select all

public static string GenerateFilename()
{
    string valid_chars = "abcdefgijkmnopqrstwxyz1234567890";
    string temp = string.Empty;
    Random r = new Random();
    for (int i = 0; i < 5; i++)
        temp += valid_chars[r.Next(valid_chars.Length)];
    return temp;
}


In the raw feed this is:

Code: Select all

&lt;pre&gt;
public static string GenerateFilename()
{
    string valid_chars = "abcdefgijkmnopqrstwxyz1234567890";
    string temp = string.Empty;
    Random r = new Random();
    for (int i = 0; i &lt; 5; i++)
        temp += valid_chars[r.Next(valid_chars.Length)];
    return temp;
}
&lt;/pre&gt;


But in the tt-rss display of the article this pre-formatted section gets cut off:

Code: Select all

public static string GenerateFilename()
{
    string valid_chars = "abcdefgijkmnopqrstwxyz1234567890";
    string temp = string.Empty;
    Random r = new Random();
    for (int i = 0; i


although the article continues OK after the </pre>.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Published Articles RSS feed does not display some caract

Postby fox » 01 May 2013, 16:41

If you actually look at the changeset above you'll notice that it only concerns entry title.

Athanasius
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 02 Apr 2013, 21:01

Re: Published Articles RSS feed does not display some caract

Postby Athanasius » 01 May 2013, 16:42

Would you like me to open a new issue for this then ?

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Published Articles RSS feed does not display some caract

Postby fox » 01 May 2013, 18:04

See FAQ entry 1.

Athanasius
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 02 Apr 2013, 21:01

Re: Published Articles RSS feed does not display some caract

Postby Athanasius » 01 May 2013, 19:12

Fair enough. Although for the benefit of others, don't think that just because the content of an article made it into your database OK (it did for my example when I checked) this means SimplePie is off the hook. It took me some time to spot that classes/feeds.php does end up calling sanitize() on the content in combined feed display mode and that sanitize() is part of SimplePie, i.e. it's used not only when fetching and parsing feeds to store but also as part of the display code in this instance.

I'll go poke the SimplePie people.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Published Articles RSS feed does not display some caract

Postby fox » 01 May 2013, 19:17

>the content of an article made it into your database OK

Why am I not seeing anything about this in the above post?

>and that sanitize() is part of SimplePie,

Actually, it's not.

Please learn to express yourself coherently, I don't have time to squeeze people for information.

Athanasius
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 02 Apr 2013, 21:01

Re: Published Articles RSS feed does not display some caract

Postby Athanasius » 01 May 2013, 19:25

Hang on, no, the sanitize() it calls has 4 arguments, that makes it the one in include/functions.php starting line 2700. If I remove the call to this in classes/feeds.php line 520, making it instead:

Code: Select all

$line["content"] = $line["content_preview"]

then the article displays without issues.

User avatar
Monfreid
Bear Rating Trainee
Bear Rating Trainee
Posts: 23
Joined: 04 Apr 2013, 18:16

Re: Published Articles RSS feed does not display some caract

Postby Monfreid » 13 May 2013, 15:47

Monfreid wrote:Thanks for this Fox, I will try this fix and hopefully it will fix my problem :-)


Hi Fox,

I've tried your fix the other day and it didn't work but now it seems to work as if it needed a bit of time to be effective.
I have 2 instances of tt-rss, one with the fix and the other one without and I can see the difference, titles that have 2 or ' are now showing correct in the Published Articles feed.

Monfreid wrote:Maybe there is not a lot of people using the published articles feeds but I'm one of them and I use them intensively in Google Reader for my 2 websites. without this, maintaining my websites will be much more difficult. These websites generates some revenue (not a lot) to me so having this working would be great. I would give a donation for the fix


Donation on the way ... (not a lot but you can have a few beers on me :D )

Thanks a lot for all your hard work on this reader!

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: Published Articles RSS feed does not display some caract

Postby fox » 13 May 2013, 16:05

Thanks. As far as I remember, the content was mangled on import, so it would only apply on newly imported articles.


Return to “Support”

Who is online

Users browsing this forum: No registered users and 12 guests