From c77f865096506f8ba066b70695d318c011e58768 Mon Sep 17 00:00:00 2001 From: soraefir Date: Thu, 24 Aug 2023 10:35:37 +0200 Subject: [PATCH] Fixing GPX parse error --- router/api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router/api.js b/router/api.js index a5a4ca6..444d980 100644 --- a/router/api.js +++ b/router/api.js @@ -50,7 +50,7 @@ module.exports = (fastify, opts, done) => { let file = '' const data = JSON.parse(val); const gen_wpt = (name,desc,latlon,icon="Flag") => `0${name}-${desc}${icon}` - const esc_str = (str) => str.replace('"',""").replace("'","'").replace("<","<").replace(">",">").replace("&","&").repace("\n","...") + const esc_str = (str) => str.replace('"',""").replace("'","'").replace("<","<").replace(">",">").replace("&","&").replace("\n","...") data.main.forEach(a => { file+= gen_wpt(esc_str(a.hotel.name), esc_str(a.hotel.notes), a.hotel.latlon, icon="Hotel"); a.places.restaurants.forEach(b => {