Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit 2c3379c5e38c39f78eff2129a42191e72ace88aa 1 parent 400910e
@idonthack idonthack authored spladug committed
Showing with 5 additions and 2 deletions.
  1. +5 −2 r2/r2/templates/comment.xml
7 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 @@
author =
body = thing.body
+ permalink = add_sr(thing.permalink, force_hostname = True)
- <guid isPermaLink="true">${thing.permalink}</guid>
+ <guid isPermaLink="true">${permalink}</guid>
<title>${author} ${_("on")} ${}</title>
- <link>${thing.permalink}</link>
+ <link>${permalink}</link>
Please sign in to comment.
Something went wrong with that request. Please try again.