X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FWwwAtomStream.pm;h=658934a27d572e027e3c70d1b23f34e3071c646b;hb=aa0e67e63e58e0ee4fc3918bde25b9c04d48954a;hp=9ec1383dada276b101a35df7ea3809692609567e;hpb=195c40c82e77c73e171f75529b80c7561565d512;p=public-inbox.git diff --git a/lib/PublicInbox/WwwAtomStream.pm b/lib/PublicInbox/WwwAtomStream.pm index 9ec1383d..658934a2 100644 --- a/lib/PublicInbox/WwwAtomStream.pm +++ b/lib/PublicInbox/WwwAtomStream.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2019 all contributors +# Copyright (C) 2016-2020 all contributors # License: AGPL-3.0+ # # Atom body stream for which yields getline+close methods @@ -23,7 +23,7 @@ sub new { my ($class, $ctx, $cb) = @_; $ctx->{emit_header} = 1; $ctx->{feed_base_url} = $ctx->{-inbox}->base_url($ctx->{env}); - bless { cb => $cb || *close, ctx => $ctx }, $class; + bless { cb => $cb || \&close, ctx => $ctx }, $class; } sub response { @@ -140,9 +140,12 @@ sub feed_entry { "$uuid$irt" . qq{} . qq{} . - qq() . - PublicInbox::View::multipart_text_as_html($mime, $href, $ctx) . - ''; + qq(); + $ctx->{obuf} = \$s; + $ctx->{mhref} = $href; + PublicInbox::View::multipart_text_as_html($mime, $ctx); + delete $ctx->{obuf}; + $s .= ''; } sub feed_updated {