X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=ND%2FWeb%2FForum.pm;h=6b122c67e30122e36a8a11320db66388bb339179;hb=f6cfe40e6a8da61229131a2d38a2535ae66da359;hp=76adfb2915560654bf96268d48d6d32751204605;hpb=a0338ef8c49837940c009341b135fd038d8acf7a;p=ndwebbie.git diff --git a/ND/Web/Forum.pm b/ND/Web/Forum.pm index 76adfb2..6b122c6 100644 --- a/ND/Web/Forum.pm +++ b/ND/Web/Forum.pm @@ -58,7 +58,11 @@ ORDER BY fp.time ASC my $text = parseMarkup(escapeHTML(param('message'))); $text .= p b $@ if $@; push @posts,{message => $text, unread => 1, username => 'PREVIEW', Time => 'Not submitted yet', NewPosts => $old ? 1 : 0}; - $template->param(Message => param('message')); + + $text = escapeHTML param('message'); + $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; + $template->param(Message => $text); } $template->param(Posts => \@posts);