fdfd
This commit is contained in:
parent
f8a62da9bf
commit
081be8c272
1 changed files with 13 additions and 1 deletions
|
@ -75,7 +75,19 @@ no_images = ['b',
|
||||||
'span',
|
'span',
|
||||||
]
|
]
|
||||||
|
|
||||||
allowed_attributes = {'*': ['href', 'style', 'src', 'class', 'title', 'rel', 'data-bs-original-name', 'direction', 'behavior', 'scrollamount']}
|
def sanitize_marquee(tag, name, value):
|
||||||
|
if name in allowed_attributes['*'] or name in ['direction', 'behavior', 'scrollamount']: return True
|
||||||
|
|
||||||
|
if name in ['width', 'height']:
|
||||||
|
try: value = int(value)
|
||||||
|
except: return False
|
||||||
|
if 0 < value <= 200: return True
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
|
allowed_attributes = {
|
||||||
|
'*': ['href', 'style', 'src', 'class', 'title', 'rel', 'data-bs-original-name'],
|
||||||
|
'marquee': sanitize_marquee}
|
||||||
|
|
||||||
allowed_protocols = ['http', 'https']
|
allowed_protocols = ['http', 'https']
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue