diff --git a/data/test_data/gpx/export_test.gpx b/data/test_data/gpx/export_test.gpx index 03f31b35e4..87e3a53057 100644 --- a/data/test_data/gpx/export_test.gpx +++ b/data/test_data/gpx/export_test.gpx @@ -5,7 +5,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 https://www.topografix.com/GPX/1/1/gpx.xsd http://www.topografix.com/GPX/gpx_style/0/2 https://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 https://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd"> - My route + <&"]]> & "]]> diff --git a/kml/serdes_gpx.cpp b/kml/serdes_gpx.cpp index 1a95c31030..fb7dd376f9 100644 --- a/kml/serdes_gpx.cpp +++ b/kml/serdes_gpx.cpp @@ -557,7 +557,11 @@ void SaveCategoryData(Writer & writer, CategoryData const & categoryData) { writer << "\n"; if (auto const name = GetDefaultLanguage(categoryData.m_name)) - writer << kIndent2 << "" << *name << "\n"; + { + writer << kIndent2 << ""; + SaveStringWithCDATA(writer, *name); + writer << "\n"; + } if (auto const description = GetDefaultLanguage(categoryData.m_description)) { writer << kIndent2 << "";