allow target="_blank" for href

This commit is contained in:
j 2020-10-15 11:39:19 +02:00
parent a2c9309808
commit 851204c619

View file

@ -290,8 +290,10 @@ def sanitize_html(html, tags=None, global_attributes=[]):
{ {
'name': 'a', 'name': 'a',
'required': ['href'], 'required': ['href'],
'optional': ['target'],
'validation': { 'validation': {
'href': valid_url 'href': valid_url,
'target': '^_blank$',
} }
}, },
{'name': 'br'}, {'name': 'br'},