opoto / wtracks

Online track editor for outdoor activities
https://opoto.github.io/wtracks
Apache License 2.0
84 stars 25 forks source link

Get back `+` from `import=` url data. Fixes #29 #30

Closed eddy-geek closed 2 years ago

eddy-geek commented 2 years ago

An alternate fix would be to use URL-safe base64url encoding variant ie simply replace encoded + and / by - and _ in utils.js in b64EncodeUnicode / b64DecodeUnicode like in urlsafe-base64.js.

Doing so would even be backwards-compatible with existing (already broken) URLs.

Right now this fix may be incomplete as it does not handle the / case, which could break URL parsing.

opoto commented 2 years ago

Good catch, thanks!

opoto commented 2 years ago

I agree a proper fix would be to use - and _ instead of + and /