Also filter 8-bit control sequences when sanitizing

This commit is contained in:
Kovid Goyal
2017-12-15 09:36:45 +05:30
parent 684a2e05f4
commit a6700c951a
2 changed files with 2 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ def timeit(name, do_timing=False):
def sanitize_title(x):
return re.sub(r'\s+', ' ', re.sub(r'[\0-\x19]', '', x))
return re.sub(r'\s+', ' ', re.sub(r'[\0-\x19\x80-\x9f]', '', x))
def color_as_int(val):

View File

@@ -289,7 +289,7 @@ class Window:
if isinstance(text, str):
text = text.encode('utf-8')
if self.screen.in_bracketed_paste_mode:
text = text.replace(b'\033[201~', b'')
text = text.replace(b'\033[201~', b'').replace(b'\x9b201~', b'')
self.screen.paste(text)
def copy_to_clipboard(self):