mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-14 13:46:49 +02:00
Fix bug in get_email where HTML tags sometimes included in text, reported in #565
This commit is contained in:
parent
45115ba5c7
commit
55b55edb90
@ -395,8 +395,9 @@ def ticket_from_message(message, queue, logger):
|
|||||||
if not body:
|
if not body:
|
||||||
mail = BeautifulSoup(part.get_payload(), "lxml")
|
mail = BeautifulSoup(part.get_payload(), "lxml")
|
||||||
if ">" in mail.text:
|
if ">" in mail.text:
|
||||||
message_body = mail.text.split(">")[1]
|
body = mail.find('body')
|
||||||
body = message_body.encode('ascii', errors='ignore')
|
body = body.text
|
||||||
|
body = body.encode('ascii', errors='ignore')
|
||||||
else:
|
else:
|
||||||
body = mail.text
|
body = mail.text
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user