]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/comments.pm
Revert "comment: Don't show comments of subpages on parent pages. (Fixes bug introduc...
[ikiwiki.git] / IkiWiki / Plugin / comments.pm
index 1287590a77ecb833a8a80f2b4d5a48ec12de971e..6691dbafa2e0b0f74055992331b2d899616fd85b 100644 (file)
@@ -364,8 +364,8 @@ sub editcomment ($$) {
        }
 
        # The untaint is OK (as in editpage) because we're about to pass
-       # it to file_pruned anyway
-       my $page = $form->field('page');
+       # it to file_pruned and wiki_file_regexp anyway.
+       my ($page) = $form->field('page')=~/$config{wiki_file_regexp}/;
        $page = IkiWiki::possibly_foolish_untaint($page);
        if (! defined $page || ! length $page ||
                IkiWiki::file_pruned($page)) {