diff --git a/app/characters.py b/app/characters.py index c63e2a5..026f753 100644 --- a/app/characters.py +++ b/app/characters.py @@ -238,7 +238,7 @@ def upload(id): flash("You accept all consequences from these actions", "danger") log_audit(f"Updated {character_data.id}'s xml data") return redirect(url_for('characters.view', id=id)) - form.char_xml.data = character_data.xml_data + form.char_xml.data = ET.tostring(ET.indent(ET.XML(character_data.xml_data)), encoding='unicode') return render_template("character/upload.html.j2", form=form) diff --git a/app/templates/character/upload.html.j2 b/app/templates/character/upload.html.j2 index 7564d62..224f0b7 100644 --- a/app/templates/character/upload.html.j2 +++ b/app/templates/character/upload.html.j2 @@ -9,10 +9,22 @@ {% endblock content_before %} {% block content %} -

PROCEED WITH CAUTION

+ +
{{ form.csrf_token }} -
+
{{ helper.render_field(form.char_xml) }} {{ helper.render_submit_field(form.submit) }}