From: Eric Wong <normalperson@yhbt.net>
To: meta@public-inbox.org
Subject: [13/11 PATCH] feed: fix <updated> tag in Atom feed
Date: Tue, 1 Sep 2015 09:30:42 +0000 [thread overview]
Message-ID: <20150901093042.GA3755@dcvr.yhbt.net> (raw)
In-Reply-To: <1441097728-31950-6-git-send-email-e@80x24.org>
Fixes commit d44ed46ee92c78aaaed64975c4d6846613963be4
("implement per-thread Atom feeds")
---
lib/PublicInbox/Feed.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm
index 4420fde..9615880 100644
--- a/lib/PublicInbox/Feed.pm
+++ b/lib/PublicInbox/Feed.pm
@@ -331,6 +331,7 @@ sub add_to_feed {
my $date = $header_obj->header('Date');
$date = PublicInbox::Hval->new_oneline($date);
$date = feed_date($date->raw) or return 0;
+ $date = "<updated>$date</updated>";
my $title = mime_header($header_obj, 'Subject') or return 0;
$title = title_tag($title);
@@ -342,8 +343,7 @@ sub add_to_feed {
$email = PublicInbox::Hval->new_oneline($email)->as_html;
if (delete $feed_opts->{emit_header}) {
- $fh->write(atom_header($feed_opts, $title) .
- "<updated>$date</updated>");
+ $fh->write(atom_header($feed_opts, $title) . $date);
}
$fh->write("<entry><author><name>$name</name><email>$email</email>" .
"</author>$title$date" .
--
EW
next prev parent reply other threads:[~2015-09-01 9:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 8:55 [PATCH 01/11] search: reduce redundant doc data Eric Wong
2015-09-01 8:55 ` [PATCH 02/11] search: allow querying all mail with '' Eric Wong
2015-09-01 8:55 ` [PATCH 03/11] search: show newest results first Eric Wong
2015-09-01 8:55 ` [PATCH 04/11] feed: use updated date based on git commit date Eric Wong
2015-09-01 8:55 ` [PATCH 05/11] feed: extract atom header generation Eric Wong
2015-09-01 8:55 ` [PATCH 06/11] implement per-thread Atom feeds Eric Wong
2015-09-01 9:30 ` Eric Wong [this message]
2015-09-01 8:55 ` [PATCH 07/11] www: compile mbox regexp only once Eric Wong
2015-09-01 8:55 ` [PATCH 08/11] www: root atom feed is "new.atom" and not "atom.xml" Eric Wong
2015-09-01 8:55 ` [PATCH 09/11] completely revamp URL structure to shorten permalinks Eric Wong
2015-09-01 8:55 ` [PATCH 10/11] view: drop extra '</a>' tag Eric Wong
2015-09-01 8:55 ` [PATCH 11/11] view: more robust link generation Eric Wong
2015-09-01 9:08 ` [PATCH 12/11] view: add missing space Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150901093042.GA3755@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).