Fixing GPX parse error
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
b9c17a9e9c
commit
31382f1229
@ -51,10 +51,6 @@ module.exports = (fastify, opts, done) => {
|
||||
const data = JSON.parse(val);
|
||||
const gen_wpt = (name,desc,latlon,icon="Flag") => `<wpt lat="${latlon[0]}" lon="${latlon[1]}"><ele>0</ele><name>${name}</name><cmt>-</cmt><desc>${desc}</desc><sym>${icon}</sym></wpt>`
|
||||
const esc_str = (str) => str.replace('"',""").replace("'","'").replace("<","<").replace(">",">").replace("&","&").repace("\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 => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user