fix videos

remotes/1693176582716663532/tmp_refs/heads/watchparty
Aevann1 2022-10-23 10:57:13 +02:00
parent 0f4462ca5b
commit c8f24eab1b
1 changed files with 2 additions and 4 deletions

View File

@ -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)