allow target="_blank" for href
This commit is contained in:
parent
a2c9309808
commit
851204c619
1 changed files with 3 additions and 1 deletions
|
@ -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'},
|
||||||
|
|
Loading…
Reference in a new issue