manyixu / rssdler

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

Percent symbols are double-escaped for filenames with square brackets #55

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Subscribe to a feed with file names that include square brackets
2.
3.

What is the expected output? What do you see instead?
Percent signs are double-escaped, causing a 404 error. For example,
Correct:
http://torrents.speedsubs.org/eclipse/%5bEclipse%5d%20Kaichou%20wa%20Maid-sama%2
0-%2002%20(1280x720%20h264)%20%5bA3508CA2%5d.mkv.torrent

Double-escaped
http://torrents.speedsubs.org/eclipse/%255bEclipse%255d%20Kaichou%20wa%20Maid-sa
ma%20-%2002%20%281280x720%20h264%29%20%255bA3508CA2%255d.mkv.torrent

What version of the product are you using? On what operating system?
rssdler 0.4.2 on Ubuntu Karmic

Please provide any additional information below.

Original issue reported on code.google.com by sanguine...@gmail.com on 15 Apr 2010 at 12:32

GoogleCodeExporter commented 8 years ago
20100410.18:57 DEBUG    unQuoteReQuote
http://torrents.speedsubs.org/eclipse/%5bEclipse%5d%20Kaichou%20wa%20Maid-sama%2
0-%2002%20(1280x720%20h264)%20%5bA3508CA2%5d.mkv.torrent
20100410.18:57 DEBUG    checking download<x>
20100410.18:57 DEBUG    checking regExTrue on [Eclipse] Kaichou wa Maid-sama - 
02
(1280x720 h264) [A3508CA2].<U+200B>mkv
20100410.18:57 DEBUG    encoding url
http://torrents.speedsubs.org/eclipse/%255bEclipse%255d%20Kaichou%20wa%20Maid-sa
ma%20-%2002%20%281280x720%20h264%29%20%255bA3508CA2%255d.mkv.torrent
20100410.18:57 DEBUG    grabbing page at url
http://torrents.speedsubs.org/eclipse/%255bEclipse%255d%20Kaichou%20wa%20Maid-sa
ma%20-%2002%20%281280x720%20h264%29%20%255bA3508CA2%255d.mkv.torrent

Original comment by sanguine...@gmail.com on 15 Apr 2010 at 12:34

GoogleCodeExporter commented 8 years ago
I think the bug is in percentUnQuote because it doesn't recognize lower case 
%ab quoted sequences. As a consequence unQuoteReQuote requotes percent sign as 
a separate character. Can you try attached diff and see if it fixes your issue?

Original comment by swell.k@gmail.com on 8 Jun 2010 at 1:55

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Perhaps, better to use re.sub() and apply it to xmlUnEscape as well, e.g.
http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/147706

Original comment by swell.k@gmail.com on 8 Jun 2010 at 11:58