mirror of https://gitlab.com/bashrc2/epicyon
Check svg files within themes
parent
192eeaff27
commit
99065723cb
13
tests.py
13
tests.py
|
@ -3441,6 +3441,19 @@ def _testDangerousSVG() -> None:
|
||||||
'</svg>'
|
'</svg>'
|
||||||
assert dangerousSVG(svgContent, False)
|
assert dangerousSVG(svgContent, False)
|
||||||
|
|
||||||
|
baseDir = os.getcwd()
|
||||||
|
for subdir, dirs, files in os.walk(baseDir + '/theme'):
|
||||||
|
for f in files:
|
||||||
|
if not f.endswith('.svg'):
|
||||||
|
continue
|
||||||
|
svgFilename = os.path.join(subdir, f)
|
||||||
|
print(svgFilename)
|
||||||
|
content = ''
|
||||||
|
with open(svgFilename, 'r') as fp:
|
||||||
|
content = fp.read()
|
||||||
|
assert not dangerousCSS(content, False)
|
||||||
|
# deliberately no break - should resursively scan
|
||||||
|
|
||||||
|
|
||||||
def _testDangerousMarkup():
|
def _testDangerousMarkup():
|
||||||
print('testDangerousMarkup')
|
print('testDangerousMarkup')
|
||||||
|
|
Loading…
Reference in New Issue