mirror of
https://github.com/szepeviktor/wordpress-website-lifecycle.git
synced 2025-08-17 18:11:08 +08:00
Fix query string encoding in core-http-reencode-not-encoded-characters
This commit is contained in:
parent
4c31516149
commit
f893c9b687
2 changed files with 4 additions and 3 deletions
|
@ -202,7 +202,7 @@ MU Plugin Template
|
|||
*/
|
||||
```
|
||||
|
||||
See [/mu-plugins/](/mu-plugins/) directory for its content.
|
||||
See [/mu-plugins/](/mu-plugins/) directory for MU plugins.
|
||||
|
||||
## Plugin authors with enterprise mindset
|
||||
|
||||
|
|
|
@ -20,8 +20,9 @@ add_action(
|
|||
// * character from Google Analytics
|
||||
$query_parameters = [];
|
||||
parse_str($parsed_url['query'], $query_parameters);
|
||||
$query_string = http_build_query($query_parameters, '', '&', PHP_QUERY_RFC3986);
|
||||
$request_uri .= '?' . $query_string;
|
||||
// RFC 3986
|
||||
$request_uri = add_query_arg(rawurlencode_deep($query_parameters), $request_uri);
|
||||
$query_string = ltrim(add_query_arg(rawurlencode_deep($query_parameters), ''), '?');
|
||||
}
|
||||
|
||||
$_SERVER['REQUEST_URI'] = $request_uri;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue