forked from rDrama/rDrama
fix typo
parent
89b65fda0e
commit
ce6d4da592
|
@ -7,7 +7,7 @@ from files.helpers.regex import sanitize_url_regex
|
||||||
from files.helpers.config.const import *
|
from files.helpers.config.const import *
|
||||||
|
|
||||||
allowed_tags = ('a','audio','b','big','blink','blockquote','br','center','code','del','details','em','g','gl','h1','h2','h3','h4','h5','h6','hr','i','img','li','lite-youtube','marquee','ol','p','pre','rp','rt','ruby','small','span','spoiler','strike','strong','sub','summary','sup','table','tbody','td','th','thead','tr','u','ul','video')
|
allowed_tags = ('a','audio','b','big','blink','blockquote','br','center','code','del','details','em','g','gl','h1','h2','h3','h4','h5','h6','hr','i','img','li','lite-youtube','marquee','ol','p','pre','rp','rt','ruby','small','span','spoiler','strike','strong','sub','summary','sup','table','tbody','td','th','thead','tr','u','ul','video')
|
||||||
allowed_tags_runstime = ('div', 'input', 'label', 'score', 'button', 'd')
|
allowed_tags_runtime = ('div', 'input', 'label', 'score', 'button', 'd')
|
||||||
allowed_css_properties = ('background-color', 'color', 'filter', 'font-weight', 'text-align', 'transform')
|
allowed_css_properties = ('background-color', 'color', 'filter', 'font-weight', 'text-align', 'transform')
|
||||||
|
|
||||||
def allowed_attributes(tag, name, value):
|
def allowed_attributes(tag, name, value):
|
||||||
|
@ -67,7 +67,7 @@ def allowed_attributes(tag, name, value):
|
||||||
if tag == 'table':
|
if tag == 'table':
|
||||||
if name == 'class' and value == 'table': return True
|
if name == 'class' and value == 'table': return True
|
||||||
|
|
||||||
if tag in allowed_tags_runstime:
|
if tag in allowed_tags_runtime:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
@ -78,7 +78,7 @@ def bleach_body_html(body_html, runtime=False):
|
||||||
|
|
||||||
tags = allowed_tags
|
tags = allowed_tags
|
||||||
if runtime:
|
if runtime:
|
||||||
tags += allowed_tags_runstime
|
tags += allowed_tags_runtime
|
||||||
|
|
||||||
body_html = bleach.Cleaner(
|
body_html = bleach.Cleaner(
|
||||||
tags=tags,
|
tags=tags,
|
||||||
|
|
Loading…
Reference in New Issue