Fix client.ts for encoded uris
Some url related variables could contain already encoded URIs. This PR will decode such strings to prevent double encoding of URIs.
I clearly understand the intent, but the implementation seems to be a bit dirty: it unconditionally runs all this strings through decoder, which may result in unintended consequences.
This repo doesn’t seem to be maintained, so I’m not very interested in improving this PR.
That said, do you have any ideas for addressing the issue? It’s a general problem with user-facing URL formatting, not just in this context.
I do have a working fork of this, perhaps I will start maintaining it since the idea is great. With your question though, I did not put enough effort to think about possible sollutions, but generally, I am skeptical of blunt application of a transformation. I think the data need to be sanitized before it enters the system and stored in a predictable format, then you can apply expected conversions when you retrieve the data from storage (here, storage is anything that stores the data, even if it is a variable). Let's postpone this discussion until I am ready to maintain the fork and we will get to this PR :)