summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/comments.pm
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin/comments.pm')
-rw-r--r--IkiWiki/Plugin/comments.pm13
1 files changed, 11 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 16f9a873f..14e785c8f 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -467,9 +467,18 @@ sub sessioncgi ($$) {
}
if ($form->submitted eq POST_COMMENT && $form->validate) {
- my $file = "$location._comment";
-
IkiWiki::checksessionexpiry($cgi, $session);
+
+ IkiWiki::check_content(content => $form->field('editcontent'),
+ subject => $form->field('subject'),
+ $config{comments_allowauthor} ? (
+ author => $form->field('author'),
+ url => $form->field('url'),
+ ) : (),
+ page => $location,
+ cgi => $cgi, session => $session);
+
+ my $file = "$location._comment";
# FIXME: could probably do some sort of graceful retry
# on error? Would require significant unwinding though