From: Michael Andreen Date: Wed, 24 Jan 2007 15:15:32 +0000 (+0000) Subject: strip up to two digits after mirc color code X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;h=617e6b318a1d053a19255bd3eabc1dbe7fe4e43b;p=ndwebbie.git strip up to two digits after mirc color code --- diff --git a/ND/Web/Include.pm b/ND/Web/Include.pm index 4b9c629..6916392 100644 --- a/ND/Web/Include.pm +++ b/ND/Web/Include.pm @@ -44,6 +44,7 @@ sub parseMarkup ($) { my $tree = BBCode::Parser->DEFAULT->parse($text); $text = $tree->toHTML; }; + $text =~ s/\x{3}\d\d?//g; #mirc color TODO: possibly match until \x{0F} and change to [color] block $text =~ s/[^\x{9}\x{A}\x{D}\x{20}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]//g; return $text; }