mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 23:43:11 +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:
|
||||
mail = BeautifulSoup(part.get_payload(), "lxml")
|
||||
if ">" in mail.text:
|
||||
message_body = mail.text.split(">")[1]
|
||||
body = message_body.encode('ascii', errors='ignore')
|
||||
body = mail.find('body')
|
||||
body = body.text
|
||||
body = body.encode('ascii', errors='ignore')
|
||||
else:
|
||||
body = mail.text
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user