mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04:00
Make breaking change not use rendered template
The breaking change page was taking the rendered template and saving that if the user confirmed the change. This meant that templates could be saved with `<span class="placeholder">…</span>` in their subject line for example. This commit fixes it so that it uses whatever data the user submitted, not the rendered version of this.
This commit is contained in:
@@ -161,7 +161,11 @@ def edit_service_template(service_id, template_id):
|
||||
return render_template(
|
||||
'views/templates/breaking-change.html',
|
||||
template_change=template_change,
|
||||
new_template=new_template,
|
||||
new_template={
|
||||
'name': form.name.data,
|
||||
'subject': subject,
|
||||
'content': form.template_content.data,
|
||||
},
|
||||
column_headings=list(ascii_uppercase[:len(new_template.placeholders) + 1]),
|
||||
example_rows=[
|
||||
first_column_headings[new_template.template_type] + list(new_template.placeholders),
|
||||
|
||||
Reference in New Issue
Block a user