Skip to content

Extra parameters dropped by "param_remove" #107

@jack-thomas

Description

@jack-thomas

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.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions