hicklemr / rtgui

Automatically exported from code.google.com/p/rtgui
0 stars 1 forks source link

No RSS Feed HTML Entity Filtering #33

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Whenever a torrent title has a special character embedded in it (an &
character, for example), some feed readers will be unable to interpret it
(I particularly noted Firefox).  I am using rtGui v0.2.3

A simple fix: 

Find line 53, which looks like...
echo "<title>".($item['complete']==1 ? "[Complete] " : "[Incomplete]
").$item['name']."</title>";

Change it to...
echo "<title>".($item['complete']==1 ? "[Complete] " : "[Incomplete]
").htmlspecialchars($item['name'])."</title>";

Note the filtering of HTML special characters.  Although I haven't tested
this 100%, I can confirm that this will handle most common characters that
will cause this issue.  

Original issue reported on code.google.com by dj.br...@gmail.com on 17 Jun 2008 at 8:30

GoogleCodeExporter commented 8 years ago
Yup, this definitely needs doing, and also for the next line:
 echo htmlspecialchars($item['tied_to_file'])." (".format_bytes($item
['size_bytes']).")";

-in for the next version :)

Original comment by lemonbe...@gmail.com on 18 Jun 2008 at 6:41

GoogleCodeExporter commented 8 years ago

Original comment by lemonbe...@gmail.com on 5 Dec 2008 at 10:28