Factor out string escaping code

So that it only lives in one place.
This commit is contained in:
Chris Hill-Scott
2017-11-06 13:22:46 +00:00
parent f6950ae987
commit f329e138cd
3 changed files with 8 additions and 3 deletions

View File

@@ -379,3 +379,7 @@ def get_cdn_domain():
domain = parsed_uri.netloc[len(subdomain + '.'):]
return "static-logos.{}".format(domain)
def unescape_string(string):
return bytes(string, "utf-8").decode('unicode_escape')