Commit d2bd0d52 authored by Ad Schellevis's avatar Ad Schellevis

(menusystem) it's ok to link to an item on the page, as long as we don't try...

(menusystem) it's ok to link to an item on the page, as long as we don't try to match it back on the server end
parent 03c201f2
......@@ -343,7 +343,9 @@ class MenuItem
foreach ($this->getFilteredChildren() as $nodeId => $node) {
$node->toggleSelected($url);
if ($node->getUrl() != "") {
$match = str_replace(array(".", "*","?"), array("\.", ".*","\?"), $node->getUrl());
// hash part isn't available on server end
$url = explode("#", $node->getUrl())[0];
$match = str_replace(array(".", "*","?"), array("\.", ".*","\?"), $url);
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