We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 189302f commit e5ad017Copy full SHA for e5ad017
server/controllers/emails.py
@@ -371,8 +371,11 @@ def send_email():
371
).scalar()
372
if not thread:
373
return {"message": "Thread not found"}, 400
374
+
375
+ # replace <br /> with \n in body
376
+ breaked_line_text = data["body"].replace("<br/>", "\n")
377
clean_regex = re.compile("<.*?>")
- clean_text = re.sub(clean_regex, " ", data["body"])
378
+ clean_text = re.sub(clean_regex, " ", breaked_line_text)
379
context = {"body": data["body"]}
380
template = env.get_template("template.html")
381
body = template.render(**context)
0 commit comments