Skip to content

Commit

Permalink
Update core-bundle/src/Routing/ResponseContext/HtmlHeadBag/HtmlHeadBa…
Browse files Browse the repository at this point in the history
…g.php

Co-authored-by: M. Vondano <m-vo@users.noreply.github.com>
  • Loading branch information
Toflar and m-vo committed Oct 27, 2021
1 parent 47b0409 commit a58098b
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -94,7 +94,7 @@ public function getCanonicalUri(Request $request): string

foreach ($request->query->all() as $originalParam => $value) {
foreach ($this->getKeepParamsForCanonical() as $param) {
$regex = sprintf('/^%s$/', str_replace('*', '.*', $param));
$regex = sprintf('/^%s$/', str_replace('\*', '.*', preg_quote($param, '/')));

if (preg_match($regex, $originalParam)) {
$params[$originalParam] = $value;
Expand Down

0 comments on commit a58098b

Please sign in to comment.