summaryrefslogtreecommitdiffstats
path: root/module/unescape.py
diff options
context:
space:
mode:
authorGravatar mkaay <mkaay@mkaay.de> 2010-05-05 18:54:17 +0200
committerGravatar mkaay <mkaay@mkaay.de> 2010-05-05 18:54:17 +0200
commit05321c6e6108b86a5a004a2e28b1e3be9a7ad225 (patch)
treeb57e91b2a09fe10b9945574e4628ceab64715c62 /module/unescape.py
parentadded missing file (diff)
downloadpyload-05321c6e6108b86a5a004a2e28b1e3be9a7ad225.tar.xz
megavideo.com plugin
Diffstat (limited to 'module/unescape.py')
-rw-r--r--module/unescape.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/unescape.py b/module/unescape.py
index 59f35f36b..41a23be5b 100644
--- a/module/unescape.py
+++ b/module/unescape.py
@@ -1,4 +1,5 @@
from htmlentitydefs import name2codepoint as n2cp
+from urllib import unquote
import re
def substitute_entity(match):
@@ -14,7 +15,8 @@ def substitute_entity(match):
def unescape(string):
entity_re = re.compile("&(#?)(\d{1,5}|\w{1,8});")
- return entity_re.subn(substitute_entity, string)[0]
+ return entity_re.subn(substitute_entity, unquote(string))[0]
+
"""
import re