From 5e9feab4039df1034e648184dc9a45d3604c68e5 Mon Sep 17 00:00:00 2001 From: Jason McBrayer Date: Thu, 24 Jan 2019 09:43:17 -0500 Subject: [PATCH] Add the inline and block tags that Pleroma permits to our scrubber Tags that are not supported: - inline images - table tags - header tags I may reconsider header tags later. --- brutaldon/settings.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/brutaldon/settings.py b/brutaldon/settings.py index 1197e8b..886c642 100644 --- a/brutaldon/settings.py +++ b/brutaldon/settings.py @@ -178,8 +178,9 @@ STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static') # Sanitizer settings -SANITIZER_ALLOWED_TAGS = ['a', 'p', 'img', 'br', 'i', 'strong'] -SANITIZER_ALLOWED_ATTRIBUTES = ['href', 'src', 'title', 'alt', 'class'] +SANITIZER_ALLOWED_TAGS = ['a', 'p', 'img', 'br', 'i', 'strong', 'em', 'pre', 'code', + 'ul', 'li', 'ol', 'blockquote', 'del', 'span', 'u'] +SANITIZER_ALLOWED_ATTRIBUTES = ['href', 'src', 'title', 'alt', 'class', 'lang'] # File upload settings. # Important: media will not work if you change this.