RSS feed corrupted by who/what?

RSS feed corrupted by who/what?

by Ian Usher -
Number of replies: 3

Hello,

Have a look at the Teachers' Playground here http://moodle.org/course/view.php?id=10 (login teacher and teacher)

Check out the RSS feed (from Flickr) at lower left - the images are corrupt (as are the links) due to there being a whitespace in the URLs... the feed validates OK so I'm wondering if this is a Moodle RSS blocks problem... here's the feed itself.

Anyone a bright idea as to why this doesn't happen? I've someone who really wants to use this... it's causing us a fair bit of frustration!

Cheers

Ian.

Average of ratings: -
In reply to Ian Usher

Re: RSS feed corrupted by who/what?

by Daryl Hawes -
The solution to this one is rather simple. In blocks/rss_client/block_rss_client.php you will find the following code around line #240:
$item['description'] = break_up_long_words($item['description'], 30);

Comment this line out by making it look like the below:
//$item['description'] = break_up_long_words($item['description'], 30);

Now reload your page.

The problem here is that the break_up_long_words function does not know better than to ignore strings within html tags.
Average of ratings: Useful (1)
In reply to Daryl Hawes

Re: RSS feed corrupted by who/what?

by Ian Usher -
Thanks Daryl, that's great... cool
In reply to Ian Usher

Re: RSS feed corrupted by who/what?

by Christian Lebe -
Or alternatively just put empty char (ie. '') for the cut char (the third parameter).
$item['description'] = break_up_long_words($item['description'], 30,'');
but then the function gets called but won't do anything..