diff --git a/panikweb/paniktags/templatetags/paniktags.py b/panikweb/paniktags/templatetags/paniktags.py index 9748317921fd11b00004478870e58dfab63da0d8..61e357a5feab8e4a470657768cd6f70fb58fef57 100644 --- a/panikweb/paniktags/templatetags/paniktags.py +++ b/panikweb/paniktags/templatetags/paniktags.py @@ -367,3 +367,9 @@ def set_absolute_urls(text): text = text.replace('src="/', 'src="%s' % settings.WEBSITE_BASE_URL) text = text.replace('href="/', 'href="%s' % settings.WEBSITE_BASE_URL) return text + +@register.filter +def as_absolute_url(url): + if url.startswith('/'): + url = settings.WEBSITE_BASE_URL + url.lstrip('/') + return url diff --git a/panikweb_templates/templates/feed/newsitem.html b/panikweb_templates/templates/feed/newsitem.html index 5d7a8ce6a0d5a8db47a4410874d2ab22d1c0a662..3b969ae47d7a860076b3418ae49596ed52761978 100644 --- a/panikweb_templates/templates/feed/newsitem.html +++ b/panikweb_templates/templates/feed/newsitem.html @@ -1,7 +1,7 @@ {% load paniktags thumbnail %} {% if obj.image %} {% thumbnail obj.image "320x240" crop="50% 25%" as im %} - + {% endthumbnail %} {% endif %} diff --git a/panikweb_templates/templates/feed/soundfile.html b/panikweb_templates/templates/feed/soundfile.html index f2717af2eefdf98f1680367c9ff0e5d6d12d748f..ea5222b33af36130d12b03779d8273e0041d5d47 100644 --- a/panikweb_templates/templates/feed/soundfile.html +++ b/panikweb_templates/templates/feed/soundfile.html @@ -1,7 +1,7 @@ {% load paniktags thumbnail %} {% if obj.episode.image %} {% thumbnail obj.episode.image "320x240" crop="50% 25%" as im %} - + {% endthumbnail %} {% endif %}