Commit 66586110 authored by Ad Schellevis's avatar Ad Schellevis

menu, replace "str_replace(array(".", "*","?", "@"), array("\.", ".*","\?",...

menu, replace "str_replace(array(".", "*","?", "@"), array("\.", ".*","\?", "\@"....) for preg_quote, as suggested by @fabianfrz
parent be9a2787
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment