Commit 85e843f2 authored by Ad Schellevis's avatar Ad Schellevis

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

Revert "menu, replace "str_replace(array(".", "*","?", "@"), array("\.", ".*","\?", "\@"....) for preg_quote, as suggested by @fabianfrz"

This reverts commit 66586110.
parent 66586110
...@@ -394,7 +394,7 @@ class MenuItem ...@@ -394,7 +394,7 @@ class MenuItem
if ($node->getUrl() != "") { if ($node->getUrl() != "") {
// hash part isn't available on server end // hash part isn't available on server end
$menuItemUrl = explode("#", $node->getUrl())[0]; $menuItemUrl = explode("#", $node->getUrl())[0];
$match = preg_quote($menuItemUrl, '@'); $match = str_replace(array(".", "*","?", "@"), array("\.", ".*","\?", "\@"), $menuItemUrl);
if (preg_match("@^{$match}$@", "{$url}")) { if (preg_match("@^{$match}$@", "{$url}")) {
$node->select(); $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