aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/CGI.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-23 20:23:57 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-08-23 20:23:57 +0000
commitd4ca3b3f50027d0dfd052f77ddcc4290ab0e6a81 (patch)
treebe344f3b7e6528a7561c290df60a3ae31f7fda49 /IkiWiki/CGI.pm
parent1f085aa76d3235e275eaefe4b7c33de1455e742f (diff)
downloadikiwiki-d4ca3b3f50027d0dfd052f77ddcc4290ab0e6a81.tar
ikiwiki-d4ca3b3f50027d0dfd052f77ddcc4290ab0e6a81.tar.gz
* Change order of linkify and preprocess; first preprocess and then linkify.
This allows passing a wikilink inside a parameter to a preprocessor directive without it being expanded to html, and leaking out of the parameter, which had required some non-obvious use of triple-quoting to avoid. Note that any preprocessor plugins that output something that looks like a wikilink will now have it treated as such; AFAIK this doesn't change any behavior though except for the template plugin. * Enable preprocessor directives when previewing an edit.
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r--IkiWiki/CGI.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index 7d4ba146f..120e2fdee 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -411,8 +411,12 @@ sub cgi_editpage ($$) { #{{{
value => $content, force => 1);
$form->field(name => "comments",
value => $comments, force => 1);
+ $config{rss}=0; # avoid preview writing an rss feed!
$form->tmpl_param("page_preview",
- htmlize($type, linkify($page, "", filter($page, $content))));
+ htmlize($type,
+ linkify($page, "",
+ preprocess($page, $page,
+ filter($page, $content)))));
}
else {
$form->tmpl_param("page_preview", "");