format xml and mke the warning better

This commit is contained in:
aronwk-aaron
2023-11-11 00:09:34 -06:00
parent a10b8d7975
commit bb63cfb8f5
2 changed files with 15 additions and 3 deletions

View File

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