Call the xml2rfc parser with normalize=True, in alignment with xml2rfc internal use.

- Legacy-Id: 14686
This commit is contained in:
Henrik Levkowetz 2018-02-23 13:46:28 +00:00
parent 742ad090fc
commit 8a9dcfc856

View file

@ -145,7 +145,7 @@ class SubmissionBaseUploadForm(forms.Form):
os.environ["XML_LIBRARY"] = settings.XML_LIBRARY
try:
parser = xml2rfc.XmlRfcParser(str(tfn), quiet=True)
self.xmltree = parser.parse()
self.xmltree = parser.parse(normalize=True)
ok, errors = self.xmltree.validate()
except Exception as exc:
raise forms.ValidationError("An exception occurred when trying to process the XML file: %s" % exc.msg)