]> sipb.mit.edu Git - ikiwiki.git/commitdiff
smcvpostcomment: indicate in form whether HTML and directives are allowed
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Mon, 17 Nov 2008 09:08:54 +0000 (09:08 +0000)
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Thu, 11 Dec 2008 21:14:02 +0000 (21:14 +0000)
IkiWiki/Plugin/smcvpostcomment.pm
templates/smcvpostcomment_form.tmpl

index 07f008e5e08adc0ea423cd920f074cb8cf431db7..2b9f1e5dcb390284df1d56e79a4d4671b78e6f0a 100644 (file)
@@ -171,7 +171,9 @@ sub sessioncgi ($$) { #{{{
        $form->tmpl_param('helponformattinglink',
                htmllink($page, $page, 'ikiwiki/formatting',
                        noimageinline => 1,
        $form->tmpl_param('helponformattinglink',
                htmllink($page, $page, 'ikiwiki/formatting',
                        noimageinline => 1,
-                       linktext => 'FormattingHelp'));
+                       linktext => 'FormattingHelp'),
+                       allowhtml => $allow_html,
+                       allowdirectives => $allow_directives);
 
        if (not exists $pagesources{$page}) {
                error(sprintf(gettext(
 
        if (not exists $pagesources{$page}) {
                error(sprintf(gettext(
index 9bce623960a976e5591e78189ad72ec8a3de017c..7f138a450c9163d0bec1a0512fe0fc4da75068e0 100644 (file)
@@ -6,8 +6,10 @@
 Subject: <TMPL_VAR FIELD-SUBJECT><br />
 <TMPL_VAR FIELD-BODY><br />
 <TMPL_VAR FORM-SUBMIT><br />
 Subject: <TMPL_VAR FIELD-SUBJECT><br />
 <TMPL_VAR FIELD-BODY><br />
 <TMPL_VAR FORM-SUBMIT><br />
-<TMPL_VAR HELPONFORMATTINGLINK>
-<TMPL_VAR FORM-END>
+<TMPL_VAR HELPONFORMATTINGLINK><br />
+HTML is <TMPL_UNLESS NAME="ALLOWHTML">not </TMPL_UNLESS>allowed.<br />
+IkiWiki directives ([[!directive]]) are <TMPL_UNLESS NAME="ALLOWDIRECTIVES">not </TMPL_UNLESS>allowed.<br />
+<TMPL_VAR NAME="FORM-END">
 
 <TMPL_IF NAME="PAGE_PREVIEW">
 <hr />
 
 <TMPL_IF NAME="PAGE_PREVIEW">
 <hr />