Open nyurik opened 1 month ago
Seems reasonable to me! Maybe url_encode(STRING)
. This would make a great first PR for anyone who wants to take a crack at it.
"URL encoding" can have several different meanings, e.g.
encodeURI
encodeURIComponent
+
and does percent-encoding in some other cases, like seen in search engine search URLsGuessing from the example case, you're seeking encodeURIComponent
-like encoding?
agree, url encoding has a number of different usecases, so it might be useful to provide more than one function. For my usecase, encodeURIComponent
is enough. I do not know how common are other usecases - I haven't encountered them (yet)
I was trying to use
curl
from just:and this worked fine until the filename had a
#
character - which broke the above because i was not URL-encoding it. I think just could use a url encoding function to handle such cases