organicmaps / organicmaps

🍃 Organic Maps is a free Android & iOS offline maps app for travelers, tourists, hikers, and cyclists. It uses crowd-sourced OpenStreetMap data and is developed with love by MapsWithMe (MapsMe) founders and our community. No ads, no tracking, no data collection, no crapware. Please donate to support the development!

Home Page:https://organicmaps.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Invalid GPX XML is exported

biodranik opened this issue · comments

& and < characters in <name> and <cmt> tags should be escaped by using &amp; and &lt;.

Or, alternatively, a whole string should be wrapped in CDATA:

  if (s.find_first_of("<&") != std::string::npos)
    writer << "<![CDATA[" << s << "]]>";
  else
    writer << s;

@cyber-toad can you please take a look? It breaks some users' bookmarks.

commented

Suggestion: Implement this for the desc as well.
In waypoints desc is more popular than cmt.
By the gpx standard:

  • cmt is suggested for a compact comment.
  • desc is suggested for extended description texts.