From 5a7fca1511bb5064703ac1ff358b4b482c13e395 Mon Sep 17 00:00:00 2001 From: Martin Boonk Date: Fri, 14 Jul 2023 18:34:51 +0200 Subject: [PATCH] gpstrek - Allow GPX 1.0 to be parsed --- apps/gpstrek/interface.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/gpstrek/interface.html b/apps/gpstrek/interface.html index 1f6ed1f37..b645abb53 100644 --- a/apps/gpstrek/interface.html +++ b/apps/gpstrek/interface.html @@ -15,6 +15,9 @@ function handleOnload(readerEvent){ var content = readerEvent.target.result; + // Replace the gpx version 1.0 with 1.1 to allow parsing older gpx files. The nodes referenced by the xsl exist in both versions. + content = content.replaceAll("http://www.topografix.com/GPX/1/0", "http://www.topografix.com/GPX/1/1"); + var xsltProcessor = new XSLTProcessor(); var myXMLHTTPRequest = new XMLHttpRequest();