]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/WwwAtomStream.pm
treewide: run update-copyrights from gnulib for 2019
[public-inbox.git] / lib / PublicInbox / WwwAtomStream.pm
index cb7ffe353f54838ed2d9559bd0ac43113096adef..ea871fe54a2ee4b4362a7196b1ae9d209e1f590e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2016-2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2016-2020 all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
 #
 # Atom body stream for which yields getline+close methods
@@ -140,9 +140,11 @@ sub feed_entry {
                "<id>$uuid</id>$irt" .
                qq{<content\ntype="xhtml">} .
                qq{<div\nxmlns="http://www.w3.org/1999/xhtml">} .
-               qq(<pre\nstyle="white-space:pre-wrap">) .
-               PublicInbox::View::multipart_text_as_html($mime, $href, $ctx) .
-               '</pre></div></content></entry>';
+               qq(<pre\nstyle="white-space:pre-wrap">);
+       $ctx->{obuf} = \$s;
+       PublicInbox::View::multipart_text_as_html($mime, $href, $ctx);
+       delete $ctx->{obuf};
+       $s .= '</pre></div></content></entry>';
 }
 
 sub feed_updated {