Opened 4 years ago
Closed 4 years ago
#52503 closed defect (bug) (duplicate)
remove_query_arg() can create a url such as `/?#anchor` instead of `/#anchor`
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | lowest | |
Severity: | trivial | Version: | |
Component: | General | Keywords: | needs-patch good-first-bug |
Focuses: | Cc: |
Description
When running remove_query_arg(), the output of the query vars differs based on if an anchor tag is included.
For example:
wp> remove_query_arg( 'foo', 'https://example.org/?foo=bar#baz' ); string(25) "https://example.org/?#baz" wp> remove_query_arg( 'foo', 'https://example.org/?foo=bar' ); string(20) "https://example.org/"
In the first example, the ?
should not be included.
Change History (1)
Note: See
TracTickets for help on using
tickets.
#44499 covers removing the
?
, within theadd_query_arg
function.