mail: strip image_src before converting to cid

This commit is contained in:
Richard Schreiber
2021-06-22 13:29:25 +02:00
parent 60c3b76ee9
commit e1ac22067a

View File

@@ -626,6 +626,7 @@ def encoder_linelength(msg):
def convert_image_to_cid(image_src, cid_id, verify_ssl=True):
image_src = image_src.strip()
try:
if image_src.startswith('data:image/'):
image_type, image_content = image_src.split(',', 1)