wikipedia: escape URLs properly
This commit is contained in:
parent
46d733bd5f
commit
200a2158bb
|
@ -11,7 +11,7 @@ import urllib2
|
|||
import urlparse
|
||||
|
||||
from hashlib import sha1
|
||||
from urllib import quote, quote_plus as _quote_plus
|
||||
from urllib import quote, unquote, quote_plus as _quote_plus
|
||||
from urllib2 import HTTPError, URLError
|
||||
|
||||
from lxml import etree, html
|
||||
|
|
|
@ -48,4 +48,4 @@ def wiki(inp):
|
|||
if len(desc) > 300:
|
||||
desc = desc[:300] + '...'
|
||||
|
||||
return '%s -- %s' % (desc, http.quote(url, ':/'))
|
||||
return '%s -- %s' % (desc, http.quote(http.unquote(url), ':/'))
|
||||
|
|
Loading…
Reference in New Issue