Avoid svg image links within content

main
Bob Mottram 2023-05-30 10:07:51 +01:00
parent 276f9fc6a6
commit a191e0b6e8
1 changed files with 2 additions and 0 deletions

View File

@ -1221,6 +1221,8 @@ def dangerous_markup(content: str, allow_local_network_access: bool,
allow_tags: []) -> bool:
"""Returns true if the given content contains dangerous html markup
"""
if '.svg' in content.lower():
return True
separators = [['<', '>'], ['&lt;', '&gt;']]
invalid_strings = [
'ampproject', 'googleapis', '_exec(', ' id=', ' name='