Skip to content

Commit

Permalink
chore: Correctly union sets while sanitizing HTML.
Browse files Browse the repository at this point in the history
  • Loading branch information
macdiesel committed Oct 28, 2024
1 parent c2b2aab commit f33e70e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion license_manager/apps/subscriptions/sanitize.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def sanitize_html(html_content):
while disallowing JavaScript and unsafe protocols.
"""
# Define allowed tags and attributes
allowed_tags = set.union(bleach.ALLOWED_TAGS, set({"span"})) # Allow all standard HTML tags
allowed_tags = set.union(set(bleach.ALLOWED_TAGS), {"span"}) # Allow all standard HTML tags
allowed_attrs = {"*": ["className", "class", "style", "id"]}
css_sanitizer = CSSSanitizer(allowed_css_properties=["color", "font-weight"])

Expand Down

0 comments on commit f33e70e

Please sign in to comment.