fix internal template handling

This commit is contained in:
2020-05-08 11:45:57 +02:00
parent 4a8d416d1c
commit 4af37798e3

View File

@@ -28,6 +28,7 @@ import re
from Milter.utils import parse_addr from Milter.utils import parse_addr
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
from copy import copy
from email.charset import Charset from email.charset import Charset
from email.header import Header, decode_header from email.header import Header, decode_header
from email import message_from_binary_file from email import message_from_binary_file
@@ -347,7 +348,7 @@ class Modification:
soup = body soup = body
if self.action == "prepend": if self.action == "prepend":
soup.insert(0, html_template) soup.insert(0, copy(html_template))
else: else:
soup.append(html_template) soup.append(html_template)