Take out call to decode, since we return str.

This commit is contained in:
Bill Dengler 2017-09-21 16:02:31 +00:00
parent d241f068c4
commit 0d09ce28c5
2 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ def StripChars(s):
Else, a unicode string will be returned."""
if match.group(1).startswith('#'): return chr(int(match.group(1)[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))
chars = "abcdefghijklmnopqrstuvwxyz"

View File

@ -17,7 +17,7 @@ def service_selecter (func):
@service_selecter
def shorten (url, service=None, **kwargs):
return service(**kwargs).shorten(url).decode("utf-8")
return service(**kwargs).shorten(url)
@service_selecter