Skip to content
Snippets Groups Projects
Commit 93864fad authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch 'dashboardfeeds-2-caching-of-feed-data' into 'master'

Add django-bleach

See merge request AlekSIS!189
parents 9b5b7bee 748b2369
No related branches found
No related tags found
1 merge request!189Add django-bleach
Pipeline #1139 failed
......@@ -85,6 +85,7 @@ INSTALLED_APPS = [
"ckeditor",
"django_js_reverse",
"colorfield",
"django_bleach",
]
merge_app_settings("INSTALLED_APPS", INSTALLED_APPS, True)
......@@ -516,3 +517,22 @@ CKEDITOR_CONFIGS = {
]),
}
}
# Which HTML tags are allowed
BLEACH_ALLOWED_TAGS = ['p', 'b', 'i', 'u', 'em', 'strong', 'a', 'div']
# Which HTML attributes are allowed
BLEACH_ALLOWED_ATTRIBUTES = ['href', 'title', 'style']
# Which CSS properties are allowed in 'style' attributes (assuming
# style is an allowed attribute)
BLEACH_ALLOWED_STYLES = [
'font-family', 'font-weight', 'text-decoration', 'font-variant'
]
# Strip unknown tags if True, replace with HTML escaped characters if
# False
BLEACH_STRIP_TAGS = True
# Strip comments, or leave them in.
BLEACH_STRIP_COMMENTS = True
This diff is collapsed.
......@@ -66,6 +66,7 @@ django-jsonstore = "^0.4.1"
django-polymorphic = "^2.1.2"
django-otp = "0.7.5"
django-colorfield = "^0.2.1"
django-bleach = "^0.6.1"
[tool.poetry.extras]
ldap = ["django-auth-ldap"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment