fix videos
parent
0f4462ca5b
commit
c8f24eab1b
|
@ -17,7 +17,7 @@ import requests
|
|||
|
||||
allowed_tags = ('b','blockquote','br','code','del','em','h1','h2','h3','h4','h5','h6','hr','i',
|
||||
'li','ol','p','pre','strong','sub','sup','table','tbody','th','thead','td','tr','ul',
|
||||
'marquee','a','span','ruby','rp','rt','spoiler','img','lite-youtube','video','source','audio','g')
|
||||
'marquee','a','span','ruby','rp','rt','spoiler','img','lite-youtube','video','audio','g')
|
||||
|
||||
allowed_styles = ['color', 'background-color', 'font-weight', 'text-align', 'filter',]
|
||||
|
||||
|
@ -57,10 +57,8 @@ def allowed_attributes(tag, name, value):
|
|||
if tag == 'video':
|
||||
if name == 'controls' and value == '': return True
|
||||
if name == 'preload' and value == 'none': return True
|
||||
return False
|
||||
|
||||
if tag == 'source':
|
||||
if name == 'src': return is_safe_url(value)
|
||||
return False
|
||||
|
||||
if tag == 'audio':
|
||||
if name == 'src': return is_safe_url(value)
|
||||
|
|
Loading…
Reference in New Issue