Warn if theme file contains svg script

main
Bob Mottram 2021-09-13 19:20:52 +01:00
parent 99065723cb
commit a312dcae7a
1 changed files with 4 additions and 1 deletions

View File

@ -3451,7 +3451,10 @@ def _testDangerousSVG() -> None:
content = ''
with open(svgFilename, 'r') as fp:
content = fp.read()
assert not dangerousCSS(content, False)
svgDangerous = dangerousCSS(content, False)
if svgDangerous:
print('svg file contains script: ' + svgFilename)
assert not svgDangerous
# deliberately no break - should resursively scan