From 2956c3eb986b83171ed6fb11460f58d8d95d5f0f Mon Sep 17 00:00:00 2001 From: Sergey Grigoriev Date: Thu, 19 Sep 2024 22:06:54 +0200 Subject: [PATCH] fix: refactoring + error handling Refs: #69 --- app/SvgUtils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/SvgUtils.py b/app/SvgUtils.py index 31df89d..24a7c35 100644 --- a/app/SvgUtils.py +++ b/app/SvgUtils.py @@ -14,7 +14,7 @@ # Process img tags, replacing base64 SVG images with PNGs def process_svg(html): - pattern = re.compile(r'[^>]+?src="data:)(?P[^;>]*?);base64,\s?(?P[^">]*?)"') + pattern = re.compile(r'[^>]+?src="data:)(?P[^;>]*?);base64,\s?(?P[A-Za-z0-9+/=]+)"') return re.sub(pattern, replace_img_base64, html)