summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kodama.kitenet.net>2008-02-24 16:37:11 -0500
committerJoey Hess <joey@kodama.kitenet.net>2008-02-24 16:37:11 -0500
commitbd55d276b3367e2c1792ea868d6e868cc26e2203 (patch)
tree29a7adb65aaa6d4be042de0008843d65fe1648a1
parent2a802c1518d2ef9b4340961c173b5b2d111c499a (diff)
Fix links generated by preprocessor directives when previewing.
As was already done for linkfication, links generated in a prevew page are relative to the top of the wiki, so it has to be told that the destpage is there. I was using "" to indicate this, but that may confuse some preprocessor plugins, which treat parameters with an empry value specially (sparkline is one such). Instead, use "/", which is more accurate anyway and works just as well.
-rw-r--r--IkiWiki/CGI.pm6
-rw-r--r--debian/changelog1
-rw-r--r--po/ikiwiki.pot2
3 files changed, 5 insertions, 4 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm
index cfb2c0b1d..87cb9c3f3 100644
--- a/IkiWiki/CGI.pm
+++ b/IkiWiki/CGI.pm
@@ -354,9 +354,9 @@ sub cgi_editpage ($$) { #{{{
});
$form->tmpl_param("page_preview",
htmlize($page, $type,
- linkify($page, "",
- preprocess($page, $page,
- filter($page, $page, $content), 0, 1))));
+ linkify($page, "/",
+ preprocess($page, "/",
+ filter($page, "/", $content), 0, 1))));
# previewing may have created files on disk
saveindex();
}
diff --git a/debian/changelog b/debian/changelog
index 093ca0f6c..f0ca4c754 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -46,6 +46,7 @@ ikiwiki (2.40) UNRELEASED; urgency=low
always available. So it was just removed.
* Disable taint checking for all builds as people keep complaining about it,
and since all versions of perl seem to be hopelessly broken.
+ * Fix links generated by preprocessor directives when previewing.
-- Josh Triplett <josh@freedesktop.org> Sun, 10 Feb 2008 13:18:58 -0800
diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot
index 1ccb583a7..8be9e2734 100644
--- a/po/ikiwiki.pot
+++ b/po/ikiwiki.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-02-24 15:37-0500\n"
+"POT-Creation-Date: 2008-02-24 16:02-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"