Welcome, Guest
Please Login or Register.    Lost Password?

Minor Bug in RSS reader + improvement suggestions
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Minor Bug in RSS reader + improvement suggestions
#14355
Minor Bug in RSS reader + improvement suggestions 3 Years, 5 Months ago  
in the rss.lua file it does not appear that the CDATA tags get properly cleaned from the description tags, or at least they do not get cleaned completely...

if you load up sports.espn.go.com/espn/rss/news into the RSS reader you can see that at the end of the description there is always a trailing "]]>" on all the descriptions.

a method similar to the one which is used to clean the title of the CDATA tags should do the trick to fix it.


also, it would be nice if in the "clean the data" function at the bottom of rss.lua similar functionality was added for the following:

elseif (str == "#38") then return "&"

not sure why some sites use the HTML Number, but at least the & is the only one i have run into it with.

i also run into the <em> tag occasionally. the "clean the data" function may not be the best place for it but the functionality i am looking for is something like:

s = string.gsub(s, "<em>", "")
s = string.gsub(s, "</em>", "")

i run into both the #38 and <em> tags quite a bit with the slashdot rss feed (one feed i would think would be quite popular among people using rainlendar). feel free to handle the em tags properly, but for me just removing them works fine. seems like removing any tag that is not a link would be a good thing...

at some point you may want to just go ahead and implement cleaning of at least everything with an HTML Name (www.ascii.cl/htmlcodes.htm).

thanks. i love rainlendar and have used it for years.
bugreporter
Senior Boarder
Posts: 58
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
Rainlendar Pro v2.13 b139 64 bit
Pro (paid/registered user)
Windows 8.1 With Update x64
 
#14363
Re:Minor Bug in RSS reader + improvement suggestions 3 Years, 5 Months ago  
Here you have a modified RSS.lua file.

The problem with the CDATA was that the script search for the CDATA only if the description is inside <content></content>.

The ESPN rss use "A &# x26; amp ; M" to show A&M. The x26 is the hexadecimal value for 38, which is &. (i hate this nested way to encode HTML). I copy the decimal to char converter to hexadecimal to char converter.

<em> means emphasis (the new <i> style).

I added the codes up to 255. (yuml)
File Attachment:
File Name: rss-7d4500a3f8c4a626d7e62d0558d95fac.lua
File Size: 11687
Jorge_Luis
Platinum Boarder
Posts: 786
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
Last Edit: 2011/02/01 10:22 By Jorge_Luis.
The administrator has disabled public write access.
 
#14371
Re:Minor Bug in RSS reader + improvement suggestions 3 Years, 5 Months ago  
Thanks. I updated the fixed rss.lua to the Shadow4 addon pack.
Rainy
Moderator
Posts: 5920
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#14434
Re:Minor Bug in RSS reader + improvement suggestions 3 Years, 5 Months ago  
awesome. thanks for the update.
bugreporter
Senior Boarder
Posts: 58
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
Rainlendar Pro v2.13 b139 64 bit
Pro (paid/registered user)
Windows 8.1 With Update x64
 
Go to topPage: 1
get the latest posts directly to your desktop