Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Make tag whitelist a set

Roland Geiderdde13e1a2a2e
diff --git a/wger/utils/constants.py b/wger/utils/constants.py
index 4dce495ac..ea6182994 100644
--- a/wger/utils/constants.py
+++ b/wger/utils/constants.py
@@ -17,7 +17,6 @@
# Standard Library
from decimal import Decimal
-
# Navigation
WORKOUT_TAB = 'workout'
EXERCISE_TAB = 'exercises'
@@ -41,9 +40,9 @@ DATE_FORMATS = [
# Allowed tags, attributes and styles allowed in textareas edited with a JS
# editor. Everything not in these whitelists is stripped.
-HTML_TAG_WHITELIST = ('b', 'i', 'strong', 'em', 'ul', 'ol', 'li', 'p')
+HTML_TAG_WHITELIST = {'b', 'i', 'strong', 'em', 'ul', 'ol', 'li', 'p'}
HTML_ATTRIBUTES_WHITELIST = {'*': 'style'}
-HTML_STYLES_WHITELIST = ('text-decoration', )
+HTML_STYLES_WHITELIST = ('text-decoration',)
# Pagination
PAGINATION_OBJECTS_PER_PAGE = 25