-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom attributes in to_xml
not escaped properly
#277
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems that if
to_xml()
is called to produce a XML file, certain conditions can cause a XML with invalid syntax to be produced.This happens whenever there are custom attributes in a waypoint. Even though the regular attributes seem to escape properly (e.g.
&
to&
), this validation doesn't seem to be done for the custom attributes. Here is an example of a failure case:This is invalid XML cause there is a disallowed ampersand at line 7 (
drinks & coffee
).This can easily be reproduced by using a GPX file with custom attributes (e.g. from OSMAnd in this case) that contain any of the special characters that are invalid in XML such as
&
.The text was updated successfully, but these errors were encountered: