]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/comments.pm
checkcontent: New hook, can be used to implement arbitrary content filters, including...
[ikiwiki.git] / IkiWiki / Plugin / comments.pm
index 16f9a873fb018ed2fc748766e7a1f36f18ec198f..14e785c8f71cc06977899abc5220856697f5fb4d 100644 (file)
@@ -467,9 +467,18 @@ sub sessioncgi ($$) {
        }
 
        if ($form->submitted eq POST_COMMENT && $form->validate) {
        }
 
        if ($form->submitted eq POST_COMMENT && $form->validate) {
-               my $file = "$location._comment";
-
                IkiWiki::checksessionexpiry($cgi, $session);
                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
 
                # FIXME: could probably do some sort of graceful retry
                # on error? Would require significant unwinding though