From 85c4b4082f7e297c5f20a95acc486c9bcb8f6e1b Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Tue, 20 Aug 2024 12:21:55 -0700 Subject: bungmobott: t2s sterilize IRC color codes --- crystal/bungmobott.cr | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crystal/bungmobott.cr b/crystal/bungmobott.cr index 29bc46f..5c21a74 100644 --- a/crystal/bungmobott.cr +++ b/crystal/bungmobott.cr @@ -684,6 +684,8 @@ def t2s( t2sifc : Channel, config : BungmoBott::Config, userdir : Path, chatuser subs = Array( Tuple( Regex, String ) ){ { /http(s|):\/\/([a-z0-9.-]+)\/[a-zA-Z0-9\/&=%-_]+/, "link to \\2" }, { /([^a-zA-Z0-9])-/, "\\1 dash "}, + { /\x{0003}[0-9]*,[0-9]*/, "" }, # IRC terminal color codes + { /\x{0003}[0-9]+/, "" }, { /\|/, " vertical bar "}, { /\`/, " grave accent "}, { /\+/, " plus "}, -- cgit v1.2.3