mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-22 07:53:19 +01:00
This commit is contained in:
parent
52289dc0db
commit
c69efa1587
@ -89,9 +89,10 @@ def send_templated_mail(template_name, email_context, recipients, sender=None, b
|
||||
''' keep new lines in html emails '''
|
||||
from django.utils.safestring import mark_safe
|
||||
|
||||
html_txt = context['comment']
|
||||
html_txt = html_txt.replace('\r\n', '<br>')
|
||||
context['comment'] = mark_safe(html_txt)
|
||||
if context.has_key('comment'):
|
||||
html_txt = context['comment']
|
||||
html_txt = html_txt.replace('\r\n', '<br>')
|
||||
context['comment'] = mark_safe(html_txt)
|
||||
|
||||
html_part = loader.get_template_from_string(
|
||||
"{%% extends '%s' %%}{%% block title %%}%s{%% endblock %%}{%% block content %%}%s{%% endblock %%}" % (email_html_base_file, t.heading, t.html)
|
||||
|
Loading…
Reference in New Issue
Block a user