mirror of
https://github.com/jpochyla/psst.git
synced 2026-04-27 15:35:56 +03:00
[GH-ISSUE #624] Add URL encoding to search #364
Labels
No labels
api
bug
build
documentation
duplicate
enhancement
good first issue
help wanted
idea
invalid
linux
lowprio
macos
pull-request
upstream
windows
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/psst#364
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @SO9010 on GitHub (Jun 9, 2025).
Original GitHub issue: https://github.com/jpochyla/psst/issues/624
Currently, we are just using a placeholder to replace the spaces in a query but it needs to changed to use URL encoding.
@arch-btw commented on GitHub (Jun 11, 2025):
Hmm, do you mean that this line needs to be improved upon, or are you referring to something else?
github.com/jpochyla/psst@0e9c8d0283/psst-gui/src/webapi/client.rs (L1351)@SO9010 commented on GitHub (Jun 11, 2025):
Yeah that line!
@secondlnl commented on GitHub (Jun 12, 2025):
Sorry for probably being slow, but why does it need improving.
@SO9010 commented on GitHub (Jun 12, 2025):
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 :)
@secondlnl commented on GitHub (Jun 12, 2025):
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:
! @ £ $ ¤ / ( ) [ ] = ? ´ ¨ ~ * ' : . , _ - µ
@SO9010 commented on GitHub (Jun 12, 2025):
Wow thank you very much! For the detailed test!
And that crate sounds good to me!