Ticket #4903 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

query strings with a forward slash give add_query_arg() problems

Reported by: markjaquith Assigned to: markjaquith
Priority: high Milestone: 2.3
Component: General Version: 2.3
Severity: normal Keywords:
Cc:

Description

echo remove_query_arg('preview', 'p=16&preview=true/');

Expected result:

p=16

Actual result:

p=16&preview=true/

add_query_arg() is checking for a forward slash in the passed $uri. If present, it is assumed that $uri is a base with an empty query string, instead of being a pure query string.

Change History

09/04/07 05:21:54 changed by markjaquith

  • status changed from new to closed.
  • resolution set to fixed.

(In [6030]) Require a slash AND the absence of an equals sign to designate the passed $uri as a base (without a query string). fixes #4903 for trunk

09/04/07 05:26:18 changed by markjaquith

(In [6031]) Actually, let's just drop that slash check altogether. Equals sign is the best indicator. fixes #4903 for trunk