]> ruin.nu Git - ndwebbie.git/commitdiff
strip up to two digits after mirc color code
authorMichael Andreen <harv@ruin.nu>
Wed, 24 Jan 2007 15:15:32 +0000 (15:15 +0000)
committerMichael Andreen <harv@ruin.nu>
Wed, 24 Jan 2007 15:15:32 +0000 (15:15 +0000)
ND/Web/Include.pm

index 4b9c6295408cff511ee93a215f61a57bae88bc92..6916392aac0d37a8255574bc8455a9c3b2b24f24 100644 (file)
@@ -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;
 }