From 095c3a2ccb374c9d05fbe6d3f961bf4a150c0282 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 26 Feb 2020 17:20:13 +0000 Subject: [PATCH] Fixed an issue where the lookup of recognized country names during draft submission grabbed the unicode name instead of the ascii name for non-ascii country strings in XML submissions. - Legacy-Id: 17345 --- ietf/submit/forms.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ietf/submit/forms.py b/ietf/submit/forms.py index 7c7fc9b4a..8d83eb9fa 100644 --- a/ietf/submit/forms.py +++ b/ietf/submit/forms.py @@ -214,8 +214,12 @@ class SubmissionBaseUploadForm(forms.Form): "name": author.attrib.get('fullname'), "email": author.findtext('address/email'), "affiliation": author.findtext('organization'), - "country": author.findtext('address/postal/country'), } + elem = author.find('address/postal/country') + if elem != None: + ascii_country = elem.get('ascii', None) + info['country'] = ascii_country if ascii_country else elem.text + for item in info: if info[item]: info[item] = info[item].strip()