Closed petergerard closed 2 months ago
@petergerard You are right, it was my opinionated approach, it conditionally uses encodeURI()
and encodeURIComponent()
. I will make a quick fix and make it always to encode full string, and later add those features as optional. Thanks for reporting!
@petergerard Thanks for reporting, new version is deployed!
I'm noticing odd behavior with the URL Encoder.
If I want to encode a URL so I can use it in a query parameter, I can't get it to work.
I noticed that if I put in
https://
it correctly encodes tohttps%3A%2F%2F
, however if I add any more characters (e.g.https://google.com/
orhttps://g
) it no longer encodes the colon or slashes and just leaves the text as-is.It seems like perhaps it is detecting that the entered text is a URL and then deciding not to encode colons or slashes, since other characters (like
%
) are still encoded.This is confusing and makes the tool not helpful for one of my primary use-cases - encoding a URL to use it as a query parameter in another URL. If there's an intentional reason for this behavior, it would be nice if it were optional.