mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01: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…
Reference in New Issue
Block a user