Add URL encoding to search
Currently, we are just using a placeholder to replace the spaces in a query but it needs to changed to use URL encoding.
Hmm, do you mean that this line needs to be improved upon, or are you referring to something else?
https://github.com/jpochyla/psst/blob/0e9c8d0283ced2c453aafa836be16de9fd51e48c/psst-gui/src/webapi/client.rs#L1351
Yeah that line!
Sorry for probably being slow, but why does it need improving.
I believe that if we don't do url encoding then we will get errors from illegal characters in urls. Which is why we needed to replace the spaces with %20. But I believe that we also need to do things like ':'.
But it was just a quick submitted issue that I didn't 100 percent check.
So if you would like to you could check if a query with something like : or any other not allowed chars in a url please feel free to do so. If not I'll be able to test soon :)
Edit: There exists a crate called urlencoding, link to docs.rs, rust discourse discussion about urlencoding in general Tested: Invalid uri " < > Status 400 # ` \ | % & { } + ^ ; € The plus symbol is okay as long as there's another character, errors only when alone. Others tested: ! @ £ $ ¤ / ( ) [ ] = ? ´ ¨ ~ * ' : . , _ - µ
Wow thank you very much! For the detailed test! And that crate sounds good to me!