mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-23 16:58:09 +02:00
Also filter 8-bit control sequences when sanitizing
This commit is contained in:
@@ -62,7 +62,7 @@ def timeit(name, do_timing=False):
|
|||||||
|
|
||||||
|
|
||||||
def sanitize_title(x):
|
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):
|
def color_as_int(val):
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ class Window:
|
|||||||
if isinstance(text, str):
|
if isinstance(text, str):
|
||||||
text = text.encode('utf-8')
|
text = text.encode('utf-8')
|
||||||
if self.screen.in_bracketed_paste_mode:
|
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)
|
self.screen.paste(text)
|
||||||
|
|
||||||
def copy_to_clipboard(self):
|
def copy_to_clipboard(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user