forked from CGM_Public/pretix_original
Fix #576 yet again
This commit is contained in:
@@ -168,7 +168,7 @@ def render_mail(template, context):
|
|||||||
if context:
|
if context:
|
||||||
body = body.format_map(TolerantDict(context))
|
body = body.format_map(TolerantDict(context))
|
||||||
body_md = bleach.linkify(bleach.clean(markdown.markdown(body), tags=bleach.ALLOWED_TAGS + [
|
body_md = bleach.linkify(bleach.clean(markdown.markdown(body), tags=bleach.ALLOWED_TAGS + [
|
||||||
'p',
|
'p', 'pre'
|
||||||
]))
|
]))
|
||||||
else:
|
else:
|
||||||
tpl = get_template(template)
|
tpl = get_template(template)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import json
|
import json
|
||||||
import re
|
import textwrap
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from django.template.loader import get_template
|
from django.template.loader import get_template
|
||||||
@@ -47,7 +47,7 @@ class BankTransfer(BasePaymentProvider):
|
|||||||
ctx = {
|
ctx = {
|
||||||
'event': self.event,
|
'event': self.event,
|
||||||
'order': order,
|
'order': order,
|
||||||
'details': re.sub('^', ' ', self.settings.get('bank_details', as_type=LazyI18nString), flags=re.MULTILINE),
|
'details': textwrap.indent(str(self.settings.get('bank_details', as_type=LazyI18nString)), ' '),
|
||||||
}
|
}
|
||||||
return template.render(ctx)
|
return template.render(ctx)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user