Skip to content

Commit

Permalink
maybe fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
aronwk-aaron committed Nov 11, 2023
1 parent bb63cfb commit 13376d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/characters.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import xmltodict
import xml.etree.ElementTree as ET
import json
from xml.dom import minidom


character_blueprint = Blueprint('characters', __name__)
Expand Down Expand Up @@ -238,7 +239,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 = ET.tostring(ET.indent(ET.XML(character_data.xml_data)), encoding='unicode')
form.char_xml.data = minidom.parseString(character_data.xml_data).toprettyxml(indent=" ")
return render_template("character/upload.html.j2", form=form)


Expand Down

0 comments on commit 13376d0

Please sign in to comment.