Commit 81bab034 authored by fred's avatar fred
Browse files

avoid illegal character in podcast feed

parent 2adb1aab
......@@ -368,3 +368,9 @@ def as_absolute_url(url):
if url.startswith('/'):
url = settings.WEBSITE_BASE_URL + url.lstrip('/')
return url
@register.filter
def xml_illegal_fix(text):
# django.utils.xmlutils.UnserializableContentError: Control characters are not supported in XML 1.0
return text.replace('\x02', ' ')
......@@ -10,5 +10,5 @@
{% endif %}
{% autoescape off %}
{{ obj.episode.text|set_absolute_urls }}
{{ obj.episode.text|xml_illegal_fix|set_absolute_urls }}
{% endautoescape %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment