mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 15:28:37 -05:00
comment permalinks in xml feeds are now valid URIs
previously, comment permalinks in xml feeds were missing the scheme and authority segments (protocol and hostname). this caused problems with feed readers and other programs that expected to encounter a valid URI.
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
|
||||
<%!
|
||||
from r2.lib.filters import safemarkdown
|
||||
from r2.lib.template_helpers import add_sr
|
||||
%>
|
||||
|
||||
|
||||
@@ -32,12 +33,14 @@
|
||||
else:
|
||||
author = thing.author.name
|
||||
body = thing.body
|
||||
|
||||
permalink = add_sr(thing.permalink, force_hostname = True)
|
||||
%>
|
||||
|
||||
<item>
|
||||
<guid isPermaLink="true">${thing.permalink}</guid>
|
||||
<guid isPermaLink="true">${permalink}</guid>
|
||||
<title>${author} ${_("on")} ${thing.link.title}</title>
|
||||
<link>${thing.permalink}</link>
|
||||
<link>${permalink}</link>
|
||||
<dc:date>${thing._date.isoformat()}-0700</dc:date>
|
||||
<description>${body|h}</description>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user