From 56766d3ad3eacae78e8e67f96802f678670e5cee Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Sat, 18 May 2019 00:38:22 -0700 Subject: [PATCH] Fix ~ not being escaped --- lexipython/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lexipython/utils.py b/lexipython/utils.py index 5bae5ef..859e9a0 100644 --- a/lexipython/utils.py +++ b/lexipython/utils.py @@ -19,6 +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 = parse.quote(s) # Encode all other characters s = re.sub(r"%", "", s) # Strip encoding %s s = s[:64] # Limit to 64 characters