Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#52503 closed defect (bug) (duplicate)

remove_query_arg() can create a url such as `/?#anchor` instead of `/#anchor`

Reported by: dd32's profile dd32 Owned by:
Milestone: Priority: lowest
Severity: trivial Version:
Component: General Keywords: needs-patch good-first-bug
Focuses: Cc:


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', '' );
string(25) ""

wp> remove_query_arg( 'foo', '' );
string(20) ""

In the first example, the ? should not be included.

Change History (1)

#1 @sabernhardt
3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

#44499 covers removing the ?, within the add_query_arg function.

Note: See TracTickets for help on using tickets.