Opened 6 years ago
Closed 6 years ago
#52503 closed defect (bug) (duplicate)
remove_query_arg() can create a url such as `/?#anchor` instead of `/#anchor`
| Reported by: | dd32 | Owned by: | |
|---|---|---|---|
| Priority: | lowest | Milestone: | |
| Component: | General | Version: | |
| Severity: | trivial | Keywords: | needs-patch good-first-bug |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
#44499 covers removing the
?, within theadd_query_argfunction.