From: Errietta Kostala Date: Mon, 11 Aug 2014 15:05:43 +0000 (+0100) Subject: Replace this properly X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7de60e91171b6db252f8260577a731efbd3b055f;p=scpubgit%2FApp-SCS.git Replace this properly --- diff --git a/lib/App/SCS/Plugin/Core/PagePlugin/PageData.pm b/lib/App/SCS/Plugin/Core/PagePlugin/PageData.pm index 142f474..bfcad4f 100644 --- a/lib/App/SCS/Plugin/Core/PagePlugin/PageData.pm +++ b/lib/App/SCS/Plugin/Core/PagePlugin/PageData.pm @@ -72,7 +72,12 @@ sub filter_content_zoom { my $author_templ = $static_dir . "/author-html/$author.html"; if (-f $author_templ) { - $_[0]->replace(HTML::Zoom->from_file($author_templ)); + $_[0]->replace(sub { + HTML::Zoom->from_file($author_templ)->collect('body', { + into => \my @replace_with, + })->run; + HTML::Zoom::ArrayStream->new({ array => \@replace_with }) + }); } else { $_[0]->replace(''); }