From: Tobias Girstmair Date: Thu, 30 May 2024 07:26:46 +0000 (+0200) Subject: highlight: keep C1 controls intact X-Git-Url: https://git.gir.st/ircpipe.git/commitdiff_plain highlight: keep C1 controls intact this pretty obviously broke utf8. --- diff --git a/contrib/highlight b/contrib/highlight index 1d3458a..f09ce8b 100755 --- a/contrib/highlight +++ b/contrib/highlight @@ -39,7 +39,7 @@ def say(*args): def sanitize(s): # removes control characters so malicious actors can't mess up our terminal # with escape sequences. this also removes formatting codes. - return re.sub(rb"[\001-\011\013\014\016-\037\177\x80-\x9F]", b"", s) + return re.sub(rb"[\001-\011\013\014\016-\037\177]", b"", s) myself = None for line in sys.stdin.buffer: