From 0200ccf4da9bfa015361d13ebb040800944f5df9 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 1 Oct 2005 08:43:51 +0000 Subject: - Patch by chx: fixed validation check. --- modules/comment.module | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/comment.module') diff --git a/modules/comment.module b/modules/comment.module index 01f732a62..3ef7b6504 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -546,8 +546,10 @@ function comment_preview($edit) { } $comment->timestamp = $edit['timestamp'] ? $edit['timestamp'] : time(); - // Preview the comment. - $output .= theme('comment_view', $comment); + // Preview the comment with security check. + if (!form_get_errors()) { + $output .= theme('comment_view', $comment); + } $output .= theme('comment_form', $edit, t('Reply')); if ($edit['pid']) { -- cgit v1.2.3