]> ruin.nu Git - ndwebbie.git/blobdiff - ND/Web/Forum.pm
preview new threads and show error message when previewing
[ndwebbie.git] / ND / Web / Forum.pm
index 1c1ecedc9b15ec1a10b131e20c07762e07d6d0a4..59b8625c0526382c657f5f4f2d1e70d1649fc49a 100644 (file)
@@ -55,7 +55,9 @@ ORDER BY fp.time ASC
        }
 
        if (defined param('cmd') && param('cmd') eq 'Preview'){
-               push @posts,{message => parseMarkup(escapeHTML(param('message'))), unread => 1, username => 'PREVIEW', Time => 'Not submitted yet', NewPosts => $old ? 1 : 0};
+               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(Posts => \@posts);
        $template->param(Message => param('message'));