From: Joey Hess Date: Wed, 25 Jun 2008 00:47:15 +0000 (-0400) Subject: pagesources might not be populated X-Git-Tag: 2.51~40 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=17a09ef88ea7cea9e9b0e29728a4b9fbddc4c489;p=ikiwiki.git pagesources might not be populated --- diff --git a/IkiWiki/Plugin/txt.pm b/IkiWiki/Plugin/txt.pm index 22c9ac903..3aad5fa07 100644 --- a/IkiWiki/Plugin/txt.pm +++ b/IkiWiki/Plugin/txt.pm @@ -29,7 +29,7 @@ sub filter (@) { my %params = @_; my $content = $params{content}; - if ($pagesources{$params{page}} =~ /\.txt$/) { + if (defined $pagesources{$params{page}} && $pagesources{$params{page}} =~ /\.txt$/) { encode_entities($content); if ($findurl) { my $finder = URI::Find->new(sub {