mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-19 19:15:22 +00:00
menu, replace "str_replace(array(".", "*","?", "@"), array("\.", ".*","\?", "\@"....) for preg_quote, as suggested by @fabianfrz
This commit is contained in:
parent
be9a278784
commit
6658611069
@ -394,7 +394,7 @@ class MenuItem
|
||||
if ($node->getUrl() != "") {
|
||||
// hash part isn't available on server end
|
||||
$menuItemUrl = explode("#", $node->getUrl())[0];
|
||||
$match = str_replace(array(".", "*","?", "@"), array("\.", ".*","\?", "\@"), $menuItemUrl);
|
||||
$match = preg_quote($menuItemUrl, '@');
|
||||
if (preg_match("@^{$match}$@", "{$url}")) {
|
||||
$node->select();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user