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:
idonthack
2010-10-20 23:08:47 -05:00
committed by Neil Williams
parent 400910ec0a
commit 2c3379c5e3

View File

@@ -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>