RSS problem with '+' in URL

RSS problem with '+' in URL

by Simon Clegg -
Number of replies: 1

I am struggling with the following BBC News feed:

http://newsapi.bbc.co.uk/feeds/search/news+sport/japan

When I enter this in my RSS Block feed manager and try to Validate Moodle coverts the + to %20 and the validator returns a 404 error.

If you put the raw RSS feed url http://newsapi.bbc.co.uk/feeds/search/news+sport/japan directly into the Validator, the Validadtor converts the + to %2B and it validates fine. However, if you enter the url into the RSS manager as http://newsapi.bbc.co.uk/feeds/search/news%2Bsport/japan Moodle can't handle it. Presumably because Moodle is encoding the character + 'incorrectly' (?)

************************************************************************************************

Raw RSS URL: http://newsapi.bbc.co.uk/feeds/search/news+sport/japan

Validator: http://newsapi.bbc.co.uk/feeds/search/news%2Bsport/japan (validates)

Moodle: http://newsapi.bbc.co.uk/feeds/search/news%20sport/japan (Does not validate and does not load into RSS block)

************************************************************************************************

Average of ratings: -
In reply to Simon Clegg

Re: RSS problem with '+' in URL

by Phil Riding -
Something similar is happening to me. I'm trying to add this RSS feed:
http://www.thes.co.uk/current_edition/rss.aspx?feed=news&rss=true

However, Moodle truncates this at the ampersand when submitting it to the feed validator, sending
http://www.thes.co.uk/current_edition/rss.aspx?feed=news
which doesn't validate.

If I add the &rss=true it does validate OK, and it works in my aggregator. However, when I subsequently try to add it, Moodle won't let me, presumably because it is still truncating the original address. I assume this is due to some issue with how Moodle deals with characters like the ampersand.

Any advice on getting around this welcome - or is this a bug that needs reporting?

Thanks
Phil