]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchview: fix <title> tag in Atom feed
authorEric Wong <e@80x24.org>
Sat, 3 Dec 2016 00:24:51 +0000 (00:24 +0000)
committerEric Wong <e@80x24.org>
Sat, 3 Dec 2016 00:25:50 +0000 (00:25 +0000)
This only affects the Atom feed for search results.
"xmlstarlet val" failed to detect or warn about this,
and I only noticed this bug while working on another
patch.

lib/PublicInbox/SearchView.pm

index ebeb41f7a153ffbd69d137600261a85d5ea5d14e..fbba9c4984f03f0a3d08a04d53c8fea730050b27 100644 (file)
@@ -220,7 +220,7 @@ sub adump {
        $x = qq{$x - search results};
        $feed_opts->{atomurl} = $feed_opts->{url} . '?'. $q->qs_html;
        $feed_opts->{url} .= '?'. $q->qs_html(x => undef);
-       $x = PublicInbox::Feed::atom_header($feed_opts, $x);
+       $x = PublicInbox::Feed::atom_header($feed_opts, "<title>$x</title>");
        $fh->write($x. PublicInbox::Feed::feed_updated());
 
        for ($mset->items) {