Invalid GPX XML is exported
biodranik opened this issue · comments
Alexander Borsuk commented
&
and <
characters in <name>
and <cmt>
tags should be escaped by using &
and <
.
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.
Willy 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.