mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-04-20 17:31:45 -04:00
Take out call to decode, since we return str.
This commit is contained in:
parent
d241f068c4
commit
0d09ce28c5
@ -23,7 +23,7 @@ def StripChars(s):
|
|||||||
Else, a unicode string will be returned."""
|
Else, a unicode string will be returned."""
|
||||||
if match.group(1).startswith('#'): return chr(int(match.group(1)[1:]))
|
if match.group(1).startswith('#'): return chr(int(match.group(1)[1:]))
|
||||||
replacement = html.entities.entitydefs.get(match.group(1), "&%s;" % match.group(1))
|
replacement = html.entities.entitydefs.get(match.group(1), "&%s;" % match.group(1))
|
||||||
return replacement.decode('iso-8859-1')
|
return replacement
|
||||||
return str(entity_re.sub(matchFunc, s))
|
return str(entity_re.sub(matchFunc, s))
|
||||||
|
|
||||||
chars = "abcdefghijklmnopqrstuvwxyz"
|
chars = "abcdefghijklmnopqrstuvwxyz"
|
||||||
|
@ -17,7 +17,7 @@ def service_selecter (func):
|
|||||||
|
|
||||||
@service_selecter
|
@service_selecter
|
||||||
def shorten (url, service=None, **kwargs):
|
def shorten (url, service=None, **kwargs):
|
||||||
return service(**kwargs).shorten(url).decode("utf-8")
|
return service(**kwargs).shorten(url)
|
||||||
|
|
||||||
|
|
||||||
@service_selecter
|
@service_selecter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user