fixes a crash with data:image/svg+xml links

This commit is contained in:
Ploum 2023-10-20 00:02:35 +02:00
parent f05adf1b59
commit 979b80c5bd
2 changed files with 3 additions and 1 deletions

View File

@ -13,6 +13,7 @@ Changes since beta1
- fixes opening mailto links
- fixes existing non-html ressources marked a to_fetch even when not needed (simple and/or confusion)
- fixes a crash with RSSfeeds without <link> element
- fixes a crash with data:image/svg+xml links
- fixes a bug in HTML renderer where some hX element were not closed properly
- fixes input in Gemini while online
- fixes a crash with invalid URL

View File

@ -146,7 +146,8 @@ def looks_like_base64(src,baseurl):
imgurl = urllib.parse.urljoin(baseurl, imgname)
else:
#We cant handle other data:image such as svg for now
imgurl = None
#Url cannot be none so set to the base URL
imgurl = urllib.parse.urljoin(baseurl,"offpunk_does_not_support_inline.svg")
else:
imgurl = urllib.parse.urljoin(baseurl, imgname)
return imgurl,imgdata