From d0635094d885f2f4cf0bc2cd05260bb4a24e1d60 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 22 Nov 2024 14:53:56 +0100 Subject: [PATCH] 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 --- util/locale_database/qlocalexml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/locale_database/qlocalexml.py b/util/locale_database/qlocalexml.py index 448ad0770d2..3d950c3af33 100644 --- a/util/locale_database/qlocalexml.py +++ b/util/locale_database/qlocalexml.py @@ -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])