]> git.0d.be Git - panikweb.git/blobdiff - panikweb/paniktags/templatetags/paniktags.py
add |hr_split tag (for radio.esperanzah.be)
[panikweb.git] / panikweb / paniktags / templatetags / paniktags.py
index ed3f949eefce3cb1210013ce081786fbb1c9be10..f0826e67dfb078aa5d0caa0af475aad13842fdc7 100644 (file)
@@ -433,3 +433,8 @@ def xml_illegal_fix(text):
         text = text.replace(char, '')
     # fffe and ffff are also invalid characters
     return text.replace('\ufffe', '').replace('\uffff', '')
+
+
+@register.filter
+def hr_split(text):
+    return re.split(r'<hr\s*/?>', text)