forked from MarseyWorld/MarseyWorld
Feeds: make RSS valid, part trois.
Hopefully finishes the RSS fix saga. This one done in-house rather than by patch, asmaster5d6d4f9ca0
and29fdc774a9
had been. This final change ensures the <updated> 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.
parent
ddc4fe756e
commit
75758dd511
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue