diff options
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 01f732a62..3ef7b6504 100644 --- a/modules/comment/comment.module +++ b/modules/comment/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']) { |