From f4a306529276a046c296776f8f76d36d27b26923 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 13 Sep 2021 20:42:51 +0100 Subject: [PATCH] Use file content --- person.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/person.py b/person.py index 65312efe9..bf84b4c75 100644 --- a/person.py +++ b/person.py @@ -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'):