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.
This commit is contained in:
Jason McBrayer 2019-01-24 09:43:17 -05:00
parent 2d3d88da72
commit 5e9feab403
1 changed files with 3 additions and 2 deletions

View File

@ -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.