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

Extra parameters dropped by "param_remove" #107

Open
jack-thomas opened this issue Jun 7, 2020 · 0 comments
Open

Extra parameters dropped by "param_remove" #107

jack-thomas opened this issue Jun 7, 2020 · 0 comments

Comments

@jack-thomas
Copy link

I have some double quotes in the URLs that I'm working with, which leading to some weird issues when I try to remove parameters.

In this example, I'm just expecting key2 to be removed, but it looks like key3 gets removed completely:

> urltools::param_remove(
+     "http://example.com/page?key1=testing1&key2=\"testing2\"&key3=testing3",
+     keys = c("key2")
+ )
[1] "http://example.com/page?key1=testing1"

In this example, I'm just expecting key2 to be removed, but it looks like key3 gets partially removed:

> urltools::param_remove(
+     "http://example.com/page?key1=testing1&key2=\"testing2\"&key3=testing3,testing4,testing5",
+     keys = c("key2")
+ )
[1] "http://example.com/page?key1=testing1&testing4,testing5"

(It doesn't seem to matter if they're encoded as %22 instead.)

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