Jump to content

Bug: Invalid GPX-Download if Form Feed (0x0c) is in Additional Waypoints


Cachologen

Recommended Posts

After Google-Earth stopped importing our Found-PQ some time ago I inspected the problem further using xmllint, which resulted in "Parser error : xmlParseCharRef: invalid xmlChar value 12".


The culprit is a Geocache with a Form Feed Character (0x0c) in the Description of an additional waypoint. This also affects direct GPX-Download on the webpage.


Steps to reproduce:

  • Add some Text containing a Form Feed Character into the textarea of the description
  • Click "Save and View"
  • Download the GPX-File of the geocache
  • Check the file for XML-Errors or try to import into GoogleEarth


This Bug may be related to this report, but I haven't tested other control characters so I cannot clearly confirm.

According to the specification of XML 1.0 - the version that the GPX-file is declared to have - allowed characters are: 

#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

As #xC is not among these allowed characters the file violates XML 1.0.

#xC is allowed as Character reference in XML 1.1:
"XML 1.1 allows the use of character references to the control characters #x1 through #x1F, most of which are forbidden in XML 1.0"

So it seems that the file is generated according to XML 1.1 instead of XML 1.0

  • Helpful 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...