RSS: Incorrect URL formatting in <media:thumbnail>

News for this website will be posted here. Mostly Technical.
Forum rules
This forum is for technical discussion regarding the portal and vore itself.

Generally speaking, if you have something that needs moderator attention, you should simply Private message Eka. That includes any bug report, error report, violation report, outage report, suggestion, feature request. Etc.

Most topics will be locked as soon as they are acknowledged. Due to the nature that not many people can do anything regarding a technical issue. In that case, if you need something unlocked for any reason. Feel free to message Eka directly.

RSS: Incorrect URL formatting in <media:thumbnail>

Postby MirceaKitsune » Tue Oct 31, 2017 11:10 am

During the day I've been working on improving a RSS widget for my desktop. As the RSS feed from Eka's Portal is what I have actively use, I just so happened to use it as a test case for my code. In the process I found a site problem.

One of the changes I implemented involves supporting thumbnail images from RSS feeds. I noticed that with feeds from Eka's however, they are not working. The warning reported by the system was that "file://static.aryion.com/g4/thumb/..." cannot be opened... which makes sense as the correct URL should be "http://static.aryion.com/g4/thumb/..." instead! I looked at the source of the RSS file and noticed that the problem lies there; The thumbnail element does not prefix URL's with "http://" but instead only with "//". You can easily see this by looking at the feed source and analyzing each <media:thumbnail> element:

view-source:https://aryion.com/g4/latest.php?rss=1

Here's an example of an incorrectly formatted line, followed by how that line should look like instead:

Code: Select all
<media:thumbnail url="//static.aryion.com/g4/thumb/423973-59518-thumb.jpg"/>
<media:thumbnail url="http://static.aryion.com/g4/thumb/423973-59518-thumb.jpg"/>


This is a bug, and in other feeds that's not how the URL is formatted. For instance if you look at the BBC feed, you can see that the URL for thumbnails starts with "http://" as I described:

view-source:http://feeds.bbci.co.uk/news/rss.xml

Can this be fixed please? It should only require an admin making a minor tweak to the RSS generator script, modifying the prefix from "//" to "http://" or "https://". Thank you.
Vore Tournament - A FOSS vore FPS based on Xonotic.
Patreon - Please support me if you enjoy my projects.
User avatar
MirceaKitsune
???
 
Posts: 2510
Joined: Tue Feb 22, 2011 8:50 pm
Location: Romania, Bucharest

Re: RSS: Incorrect URL formatting in <media:thumbnail>

Postby Eka » Tue Oct 31, 2017 8:27 pm

Okay
User avatar
Eka
Administrator
 
Posts: 4499
Joined: Fri May 13, 2005 10:59 pm
Location: Canada

Re: RSS: Incorrect URL formatting in <media:thumbnail>

Postby MirceaKitsune » Tue Oct 31, 2017 8:37 pm

Works perfectly now! Thank you :)
Vore Tournament - A FOSS vore FPS based on Xonotic.
Patreon - Please support me if you enjoy my projects.
User avatar
MirceaKitsune
???
 
Posts: 2510
Joined: Tue Feb 22, 2011 8:50 pm
Location: Romania, Bucharest


Return to Technical stuff