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] Add mode: "all" to decode() #92

Open
brianespinosa opened this issue Jul 10, 2024 · 1 comment
Open

[Feature] Add mode: "all" to decode() #92

brianespinosa opened this issue Jul 10, 2024 · 1 comment

Comments

@brianespinosa
Copy link

Nice work on this small, performant library. Works great!

If you are open to it, I would like to add a PR that adds an additional option for the decode() function where we could set { mode: "all" }. Currently the most extensive option for encoding is with { mode: "extensive" } which makes sense from a semantic perspective that this does not encode every character. Adding "all" would in fact encode every character.

Why?
I was planning to use this to fully url encode email addresses for showing on a web page. This way, mailto: and the email address itself could be fully entity encoded which should prevent all but the most sophisticated email scraper bots.

If this is out of scope for this library, I understand. Feel free to close this as such. Otherwise, let me know and I can open a PR to add this.

@mdevils
Copy link
Owner

mdevils commented Nov 3, 2024

Hello @brianespinosa. Sorry for a delay in the response. Feel free to make a PR with all mode.

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

2 participants