Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: ability to add extra characters not to be encoded in url_encode #114

Open
DyfanJones opened this issue Aug 4, 2022 · 0 comments

Comments

@DyfanJones
Copy link

Is there any plans in the future to allow extra characters not to be escaped? In python's urllib.parse.quote there is a parameter safe that allows extra characters not to be escaped (https://docs.python.org/3/library/urllib.parse.html#urllib.parse.quote).

My use case:
I am the current maintainer of a package called "paws". That creates a sdk for R to AWS. I need to be able to add the extra characters so that they don't get encoded. Here are the following modes requiring extra "safety".

encodeHost and encodeZone
][!$&'()*+,;=:<>"

encodePath
$&+,/;:=@

encodePathSegment
$&+:=@

encodeFragment
$&+,/;:=?@

See current implementation:
https://github.com/paws-r/paws/blob/01a9200a0c047607e667a211ce68d9653bb887b3/paws.common/R/url.R#L109-L149

I have managed to develop an R url encoder (https://github.com/paws-r/paws/blob/01a9200a0c047607e667a211ce68d9653bb887b3/paws.common/R/url.R#L151-L165). However it does suffer when the string needing to be encode scales up in size.

If this isn't in scope for urltools happy for you to close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant