summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/inline.pm6
-rw-r--r--debian/changelog1
-rw-r--r--doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn8
3 files changed, 14 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 001d2ed1a..8e7fa9958 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -337,7 +337,7 @@ sub preprocess_inline (@) {
foreach my $page (@list) {
my $file = $pagesources{$page};
my $type = pagetype($file);
- if (! $raw || ($raw && ! defined $type)) {
+ if (! $raw) {
if ($needcontent) {
# Get the content before populating the
# template, since getting the content uses
@@ -391,6 +391,10 @@ sub preprocess_inline (@) {
filter($page, $params{destpage},
readfile(srcfile($file)))));
}
+ else {
+ $ret.="\n".
+ readfile(srcfile($file));
+ }
}
}
}
diff --git a/debian/changelog b/debian/changelog
index 5a2d94e23..b25651f42 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,7 @@ ikiwiki (3.20091032) UNRELEASED; urgency=low
only when ikiwiki needs authentication, rather than for any access to
the cgi/wiki.
* inline: Do not generated feeds for nested inlines.
+ * inline: Allow direct inclusion of non-page files in raw mode.
-- Joey Hess <joeyh@debian.org> Fri, 06 Nov 2009 12:04:29 -0500
diff --git a/doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn b/doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn
index 814074e08..e43540c65 100644
--- a/doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn
+++ b/doc/bugs/inline_raw_broken_on_unknown_pagetype.mdwn
@@ -17,3 +17,11 @@ this situation.
If we explicitely don't want to allow raw inlining of unknown page
types, ikiwiki should output a better error message.
+
+> I have made it just do a direct include if the page type is not known, in
+> raw mode. That seems useful if you want to include some other file right
+> into a page. You could probably even wrap it in a format directive.
+>
+> It does allow including binary files right into a page, but nothing is
+> stopping you pasting binary data right into the edit form either, so
+> while annoying I don't think that will be a security problem. --[[Joey]]