From 5c643299c77275aa331befa723aa63a8e2313f50 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 6 Nov 2017 16:06:25 +1100 Subject: [PATCH] Permit span[class] in bleached content --- lemoncurry/templatetags/bleach.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lemoncurry/templatetags/bleach.py b/lemoncurry/templatetags/bleach.py index 589bd2f..3818eb1 100644 --- a/lemoncurry/templatetags/bleach.py +++ b/lemoncurry/templatetags/bleach.py @@ -5,11 +5,12 @@ from django.utils.safestring import mark_safe from bleach.sanitizer import Cleaner, ALLOWED_TAGS from bleach.linkifier import LinkifyFilter -tags = ['code', 'p', 'img'] +tags = ['code', 'p', 'img', 'span'] tags.extend(ALLOWED_TAGS) attributes = { 'a': ('href', 'title', 'class'), 'img': ('alt', 'src', 'title'), + 'span': ('class',), } register = template.Library()