From 75758dd5116013960d14ce1c5e34ed7734c57cb4 Mon Sep 17 00:00:00 2001 From: TLSM Date: Mon, 30 May 2022 07:24:26 -0400 Subject: [PATCH] Feeds: make RSS valid, part trois. Hopefully finishes the RSS fix saga. This one done in-house rather than by patch, as 5d6d4f9ca076 and 29fdc774a922 had been. This final change ensures the tag is always used, even for un-edited posts. This appears to pass the W3C Validator using local test data. We shall see how it behaves with data on prod. --- files/routes/feeds.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/files/routes/feeds.py b/files/routes/feeds.py index 2123302ba..14c17c7d0 100644 --- a/files/routes/feeds.py +++ b/files/routes/feeds.py @@ -48,11 +48,11 @@ def feeds_user(sort='hot', t='all'): with tag("id"): text(post.permalink) - if (post.edited_utc): - with tag("updated"): + with tag("updated"): + if (post.edited_utc): text(datetime.utcfromtimestamp(post.edited_utc).isoformat()+"Z") - else: - text(datetime.utcfromtimestamp(post.created_utc).isoformat()+"Z") + else: + text(datetime.utcfromtimestamp(post.created_utc).isoformat()+"Z") with tag("published"): text(datetime.utcfromtimestamp(post.created_utc).isoformat()+"Z")