Skip to content

Commit

Permalink
fix: refactoring + error handling
Browse files Browse the repository at this point in the history
Refs: #69
  • Loading branch information
grigoriev committed Sep 19, 2024
1 parent 00888e3 commit 2956c3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/SvgUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# Process img tags, replacing base64 SVG images with PNGs
def process_svg(html):
pattern = re.compile(r'<img(?P<intermediate>[^>]+?src="data:)(?P<type>[^;>]*?);base64,\s?(?P<base64>[^">]*?)"')
pattern = re.compile(r'<img(?P<intermediate>[^>]+?src="data:)(?P<type>[^;>]*?);base64,\s?(?P<base64>[A-Za-z0-9+/=]+)"')
return re.sub(pattern, replace_img_base64, html)


Expand Down

0 comments on commit 2956c3e

Please sign in to comment.