mirror of https://gitlab.com/bashrc2/epicyon
Tidying
parent
4ff9968f6b
commit
51b96f5313
7
utils.py
7
utils.py
|
@ -1191,10 +1191,9 @@ def dangerous_markup(content: str, allow_local_network_access: bool) -> bool:
|
||||||
if _is_dangerous_string_simple(content, allow_local_network_access,
|
if _is_dangerous_string_simple(content, allow_local_network_access,
|
||||||
separators, invalid_strings):
|
separators, invalid_strings):
|
||||||
return True
|
return True
|
||||||
if not html_tag_has_closing('code', content):
|
for closing_tag in ('code', 'pre'):
|
||||||
return True
|
if not html_tag_has_closing(closing_tag, content):
|
||||||
if not html_tag_has_closing('pre', content):
|
return True
|
||||||
return True
|
|
||||||
invalid_strings = [
|
invalid_strings = [
|
||||||
'script', 'noscript', 'canvas', 'style', 'abbr', 'input',
|
'script', 'noscript', 'canvas', 'style', 'abbr', 'input',
|
||||||
'frame', 'iframe', 'html', 'body', 'hr', 'allow-popups',
|
'frame', 'iframe', 'html', 'body', 'hr', 'allow-popups',
|
||||||
|
|
Loading…
Reference in New Issue