mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Escape root url pattern in Utils::url()
This commit is contained in:
parent
c7bc5f5b59
commit
4d4efb31e3
|
|
@ -134,7 +134,7 @@ abstract class Utils
|
|||
$resource = $locator->findResource($input, false);
|
||||
}
|
||||
} else {
|
||||
$root = $uri->rootUrl();
|
||||
$root = preg_quote($uri->rootUrl(), '#');
|
||||
$pattern = '#(' . $root . '$|' . $root . '/)#';
|
||||
if (!empty($root) && preg_match($pattern, $input, $matches)) {
|
||||
$input = static::replaceFirstOccurrence($matches[0], '', $input);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user