Commit 6dc62dec authored by Romain Courteaud's avatar Romain Courteaud

Allow to embed image in HTML by setting the relative URL of the image with FCKeditor

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23978 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c657810f
......@@ -104,6 +104,10 @@ for attachment in context.getAggregateValueList():\n
attachment_list.append({\'mime_type\':mime_type,\n
\'content\':content,\n
\'name\':name})\n
\n
# Allow to embed image in HTML by setting the relative URL of the image with FCKeditor\n
attachment_url = attachment.getRelativeUrl()\n
body = body.replace(\'src="%s"\' % attachment_url, \'src="cid:%s"\' % \'\'.join([\'%s\' % ord(i) for i in name]))\n
\n
# Build message per destination\n
mail_message = None\n
......@@ -206,6 +210,11 @@ if download:\n
<string>mime_type</string>
<string>content</string>
<string>name</string>
<string>attachment_url</string>
<string>append</string>
<string>$append0</string>
<string>i</string>
<string>ord</string>
<string>mail_message</string>
<string>mail_template</string>
<string>multipart</string>
......
437
\ No newline at end of file
439
\ No newline at end of file
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