forked from solderpunk/AV-98
Revert completely previous fix.
Instead, if we do not support an inline image format, we don’t display it at all instead of displaying a fake URL
This commit is contained in:
parent
979b80c5bd
commit
29c447cd8e
|
@ -1165,6 +1165,9 @@ class HtmlRenderer(AbstractRenderer):
|
|||
if not mode in self.images:
|
||||
self.images[mode] = []
|
||||
abs_url,data = looks_like_base64(src,self.url)
|
||||
#if abs_url is None, it means we don’t support
|
||||
#the image (such as svg+xml). So we hide it.
|
||||
if abs_url:
|
||||
links.append(abs_url+" "+text)
|
||||
self.images[mode].append(abs_url)
|
||||
link_id = " [%s]"%(len(links)+startlinks)
|
||||
|
|
|
@ -146,8 +146,7 @@ def looks_like_base64(src,baseurl):
|
|||
imgurl = urllib.parse.urljoin(baseurl, imgname)
|
||||
else:
|
||||
#We can’t handle other data:image such as svg for now
|
||||
#Url cannot be none so set to the base URL
|
||||
imgurl = urllib.parse.urljoin(baseurl,"offpunk_does_not_support_inline.svg")
|
||||
imgurl = None
|
||||
else:
|
||||
imgurl = urllib.parse.urljoin(baseurl, imgname)
|
||||
return imgurl,imgdata
|
||||
|
|
Loading…
Reference in New Issue
Block a user