Use file content

merge-requests/30/head
Bob Mottram 2021-09-13 20:42:51 +01:00
parent 2f70c6acff
commit f4a3065292
1 changed files with 4 additions and 1 deletions

View File

@ -1437,7 +1437,10 @@ def getPersonAvatarUrl(baseDir: str, personUrl: str, personCache: {},
if ext != 'svg':
return imPath
else:
if not dangerousSVG(imFilename, False):
content = ''
with open(imFilename, 'r') as fp:
content = fp.read()
if not dangerousSVG(content, False):
return imPath
if personJson.get('icon'):