From 2c3379c5e38c39f78eff2129a42191e72ace88aa Mon Sep 17 00:00:00 2001 From: idonthack Date: Wed, 20 Oct 2010 23:08:47 -0500 Subject: [PATCH] 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. --- r2/r2/templates/comment.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/r2/r2/templates/comment.xml b/r2/r2/templates/comment.xml index 0299e8850..6cf4288a8 100644 --- a/r2/r2/templates/comment.xml +++ b/r2/r2/templates/comment.xml @@ -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) %> - ${thing.permalink} + ${permalink} ${author} ${_("on")} ${thing.link.title} - ${thing.permalink} + ${permalink} ${thing._date.isoformat()}-0700 ${body|h}