Skip to content

Commit 53689ee

Browse files
authored
fix: Strip email subject to remove new lines chars (#36)
* FIX: Strip email subject to remove beginning and ending new lines added by text editor * DOCS: Improve comment
1 parent 73acd21 commit 53689ee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

djangocms_form_builder/actions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ def execute(self, form, request):
215215
subject = render_to_string(
216216
f"djangocms_form_builder/mails/{template_set}/subject.txt", context
217217
)
218+
# Strip beginning and ending new lines
219+
subject = subject.strip()
218220
except TemplateDoesNotExist:
219221
subject = self.subject % dict(form_name=context["form_name"])
220222

0 commit comments

Comments
 (0)