diff --git a/kitty/utils.py b/kitty/utils.py index 3486aa725..3ebcb9e7e 100644 --- a/kitty/utils.py +++ b/kitty/utils.py @@ -95,6 +95,7 @@ def get_child_status(): except ChildProcessError: del fork_child.pid + base_size = sys.getsizeof('') @@ -113,9 +114,7 @@ def timeit(name, do_timing=False): def sanitize_title(x): - if isinstance(x, bytes): - x = x.decode('utf-8', 'replace') - return re.sub(r'\s+', ' ', re.sub(r'[\0-\x19]', '', x)) + return re.sub(br'\s+', b' ', re.sub(br'[\0-\x19]', b'', x)) def get_logical_dpi():