]> git.gir.st - ircpipe.git/commitdiff
highlight: keep C1 controls intact master
authorTobias Girstmair <tobi@isticktoit.net>
Thu, 30 May 2024 07:26:46 +0000 (09:26 +0200)
committerTobias Girstmair <tobi@isticktoit.net>
Thu, 30 May 2024 07:26:46 +0000 (09:26 +0200)
this pretty obviously broke utf8.

contrib/highlight

index 1d3458ab4653c1561bf7836f06376b9826c2c1f9..f09ce8bf0169ad24a5a1a15facb8e1307da9e180 100755 (executable)
@@ -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:
Imprint / Impressum