diff options
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/CGI.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/conditional.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 4 | ||||
-rw-r--r-- | IkiWiki/Plugin/more.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/sidebar.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/smiley.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/template.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Plugin/toggle.pm | 2 | ||||
-rw-r--r-- | IkiWiki/Render.pm | 14 |
9 files changed, 16 insertions, 16 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index d92bdd330..3b1cab9a8 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -401,7 +401,7 @@ sub cgi_editpage ($$) { #{{{ htmlize($page, $type, linkify($page, "", preprocess($page, $page, - filter($page, $form->field('editcontent')), 0, 1)))); + filter($page, $page, $form->field('editcontent')), 0, 1)))); } else { $form->tmpl_param("page_preview", ""); diff --git a/IkiWiki/Plugin/conditional.pm b/IkiWiki/Plugin/conditional.pm index 6c14361f7..68ed36cc9 100644 --- a/IkiWiki/Plugin/conditional.pm +++ b/IkiWiki/Plugin/conditional.pm @@ -56,7 +56,7 @@ sub preprocess_if (@) { #{{{ $ret=""; } return IkiWiki::preprocess($params{page}, $params{destpage}, - IkiWiki::filter($params{page}, $ret)); + IkiWiki::filter($params{page}, $params{destpage}, $ret)); } # }}} package IkiWiki::PageSpec; diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 3c029e001..063673730 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -212,7 +212,7 @@ sub preprocess_inline (@) { #{{{ $ret.="\n". linkify($page, $params{page}, preprocess($page, $params{page}, - filter($page, + filter($page, $params{page}, readfile(srcfile($file))))); } } @@ -266,7 +266,7 @@ sub get_inline_content ($$) { #{{{ return htmlize($page, $type, linkify($page, $destpage, preprocess($page, $destpage, - filter($page, + filter($page, $destpage, readfile(srcfile($file)))))); } else { diff --git a/IkiWiki/Plugin/more.pm b/IkiWiki/Plugin/more.pm index 6a34682ba..667cd6415 100644 --- a/IkiWiki/Plugin/more.pm +++ b/IkiWiki/Plugin/more.pm @@ -24,7 +24,7 @@ sub preprocess (@) { #{{{ } else { $params{text}=IkiWiki::preprocess($params{page}, $params{destpage}, - IkiWiki::filter($params{page}, $params{text})); + IkiWiki::filter($params{page}, $params{destpage}, $params{text})); return "<a name=\"more\"></a>\n\n".$params{text}; } } diff --git a/IkiWiki/Plugin/sidebar.pm b/IkiWiki/Plugin/sidebar.pm index f0dd0ca03..a49726768 100644 --- a/IkiWiki/Plugin/sidebar.pm +++ b/IkiWiki/Plugin/sidebar.pm @@ -30,7 +30,7 @@ sub sidebar_content ($) { #{{{ return IkiWiki::htmlize($page, $sidebar_type, IkiWiki::linkify($sidebar_page, $page, IkiWiki::preprocess($sidebar_page, $page, - IkiWiki::filter($sidebar_page, $content)))); + IkiWiki::filter($sidebar_page, $page, $content)))); } } # }}} diff --git a/IkiWiki/Plugin/smiley.pm b/IkiWiki/Plugin/smiley.pm index 1a9833e6e..96e714d3d 100644 --- a/IkiWiki/Plugin/smiley.pm +++ b/IkiWiki/Plugin/smiley.pm @@ -36,7 +36,7 @@ sub filter (@) { #{{{ build_regexp() unless defined $smiley_regexp; $params{content} =~ s{(?:^|(?<=\s))(\\?)$smiley_regexp(?:(?=\s)|$)}{ - $1 ? $2 : htmllink($params{page}, $params{page}, $smileys{$2}, linktext => $2) + $1 ? $2 : htmllink($params{page}, $params{destpage}, $smileys{$2}, linktext => $2) }egs if length $smiley_regexp; return $params{content}; diff --git a/IkiWiki/Plugin/template.pm b/IkiWiki/Plugin/template.pm index b169f7e75..c87ba5102 100644 --- a/IkiWiki/Plugin/template.pm +++ b/IkiWiki/Plugin/template.pm @@ -50,7 +50,7 @@ sub preprocess (@) { #{{{ } return IkiWiki::preprocess($params{page}, $params{destpage}, - IkiWiki::filter($params{page}, + IkiWiki::filter($params{page}, $params{destpage}, $template->output)); } # }}} diff --git a/IkiWiki/Plugin/toggle.pm b/IkiWiki/Plugin/toggle.pm index 4a16ef32c..3f9c48672 100644 --- a/IkiWiki/Plugin/toggle.pm +++ b/IkiWiki/Plugin/toggle.pm @@ -89,7 +89,7 @@ sub preprocess_toggleable (@) { #{{{ # Preprocess the text to expand any preprocessor directives # embedded inside it. $params{text}=IkiWiki::preprocess($params{page}, $params{destpage}, - IkiWiki::filter($params{page}, $params{text})); + IkiWiki::filter($params{page}, $params{destpage}, $params{text})); my $id=genid($params{page}, $params{id}); diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 92993fd95..ef4d11235 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -159,7 +159,7 @@ sub scan ($) { #{{{ # Always needs to be done, since filters might add links # to the content. - $content=filter($page, $content); + $content=filter($page, $page, $content); my @links; while ($content =~ /(?<!\\)$config{wiki_link_regexp}/g) { @@ -186,15 +186,15 @@ sub render ($) { #{{{ my $type=pagetype($file); my $srcfile=srcfile($file); if (defined $type) { - my $content=readfile($srcfile); my $page=pagename($file); delete $depends{$page}; will_render($page, htmlpage($page), 1); - $content=filter($page, $content); - $content=preprocess($page, $page, $content); - $content=linkify($page, $page, $content); - $content=htmlize($page, $type, $content); + my $content=htmlize($page, $type, + linkify($page, $page, + preprocess($page, $page, + filter($page, $page, + readfile($srcfile))))); writefile(htmlpage($page), $config{destdir}, genpage($page, $content, mtime($srcfile))); @@ -454,7 +454,7 @@ sub commandline_render () { #{{{ my $content=readfile($srcfile); my $page=pagename($file); $pagesources{$page}=$file; - $content=filter($page, $content); + $content=filter($page, $page, $content); $content=preprocess($page, $page, $content); $content=linkify($page, $page, $content); $content=htmlize($page, $type, $content); |