we trusted the user too much
This commit is contained in:
parent
6a76dc71bf
commit
1c13258ac0
1 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ import generate
|
||||||
|
|
||||||
def sanitize_html(html):
|
def sanitize_html(html):
|
||||||
# Allow only a limited set of tags and attributes
|
# Allow only a limited set of tags and attributes
|
||||||
allowed_tags = ['a', 'b', 'i', 'em', 'strong']
|
allowed_tags = []
|
||||||
allowed_attributes = {'a': ['href']}
|
allowed_attributes = {'a': ['href']}
|
||||||
return bleach.clean(html, tags=allowed_tags, attributes=allowed_attributes)
|
return bleach.clean(html, tags=allowed_tags, attributes=allowed_attributes)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue