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

Clean-path function could be cleaner #845

Open
raucao opened this issue Feb 20, 2015 · 0 comments
Open

Clean-path function could be cleaner #845

raucao opened this issue Feb 20, 2015 · 0 comments

Comments

@raucao
Copy link
Member

raucao commented Feb 20, 2015

Instead of manually encoding e.g. single quotes, this seems to be the clean way to do it (and for everything that encodeURIComponent doesn't do it):

function fixedEncodeURIComponent (str) {  
  return encodeURIComponent(str).replace(/[!'()*]/g, escape);  
}
@raucao raucao changed the title Clean paths function could be cleaner Clean-path function could be cleaner Feb 20, 2015
@raucao raucao added the ready label Mar 19, 2016
@raucao raucao removed easy labels Nov 1, 2017
@raucao raucao removed the ready label Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant