Commit a815223c authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_corporate_identity: return as it if no image source

parent 3a20a32d
......@@ -17,7 +17,10 @@ from zExceptions import NotFound
if img_string is None or img_string == "":
return img_string
img_src = re.findall("src=['\"](.*?)['\"]", img_string)[0]
img_src = re.findall("src=['\"](.*?)['\"]", img_string)
if not len(img_src):
return img_string # There is no image source, return as is
img_src = img_src[0]
if img_src.startswith('data:image/'):
return img_string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment