QLocaleXML: use XML-safe form to write exemplar city content

Although the other parts of the locale-specific data for zone name
L10n were written using safeInTag() I'd foolishly used plain inTag()
for the exemplar city - which, of course, can also contain crazy stuff
and, it turns out, one of them (albeit this may be a CLDR "whoopsie")
does in fact end in a < (in xnr.xml in v46). So use safeInTag()
there as well and be faithful to CLDR (even if this does turn out to
be an error).

Task-number: QTBUG-130877
Change-Id: Idca22ce689cdd2409c50078498a2badfeecd4de2
Reviewed-by: Mate Barany <mate.barany@qt.io>
This commit is contained in:
Edward Welbourne 2024-11-22 14:53:56 +01:00
parent ced47a590a
commit d0635094d8

View File

@ -864,7 +864,7 @@ class QLocaleXmlWriter (object):
data: dict[str, str|tuple[str|None, str|None, str|None]] = naming[iana]
self.__openTag('zoneNames', name=iana)
if 'exemplarCity' in data:
self.inTag('exemplar', data['exemplarCity'])
self.safeInTag('exemplar', data['exemplarCity'])
for form in ('short', 'long'):
if form in data:
self.__writeZoneForms(form, data[form])