Use different escaping replacement

This commit is contained in:
Tim Van Baak 2019-05-18 00:45:24 -07:00
parent 56766d3ad3
commit 309dc68127
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ def titleescape(s):
"""
s = s.strip()
s = re.sub(r"\s+", '_', s) # Replace whitespace with _
s = re.sub(r"~", '_', s) # parse.quote doesn't catch ~
s = re.sub(r"~", '-', s) # parse.quote doesn't catch ~
s = parse.quote(s) # Encode all other characters
s = re.sub(r"%", "", s) # Strip encoding %s
s = s[:64] # Limit to 64 characters