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:
Chris Hill-Scott
2016-12-14 10:12:53 +00:00
parent dc63de0f4e
commit 1c679ae621
4 changed files with 34 additions and 10 deletions

View File

@@ -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),