From a78fa537ef3db8d87c4de9fa7f30818a0617ea1a Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 27 Sep 2018 15:03:47 -0400 Subject: [PATCH] Don't mess up fragment links in nav menu --- CRM/Core/BAO/Navigation.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CRM/Core/BAO/Navigation.php b/CRM/Core/BAO/Navigation.php index e08778fc8b..c12dc4bcf2 100644 --- a/CRM/Core/BAO/Navigation.php +++ b/CRM/Core/BAO/Navigation.php @@ -482,7 +482,6 @@ FROM civicrm_navigation WHERE domain_id = $domainID"; $parentID = CRM_Utils_Array::value('parentID', $value['attributes']); $navID = CRM_Utils_Array::value('navID', $value['attributes']); $active = CRM_Utils_Array::value('active', $value['attributes']); - $menuName = CRM_Utils_Array::value('name', $value['attributes']); $target = CRM_Utils_Array::value('target', $value['attributes']); if (in_array($parentID, $skipMenuItems) || !$active) { @@ -495,7 +494,7 @@ FROM civicrm_navigation WHERE domain_id = $domainID"; $makeLink = FALSE; if (!empty($url)) { // Skip processing fully-formed urls - if (substr($url, 0, 4) !== 'http' && $url[0] !== '/') { + if (substr($url, 0, 4) !== 'http' && $url[0] !== '/' && $url[0] !== '#') { //CRM-7656 --make sure to separate out url path from url params, //as we'r going to validate url path across cross-site scripting. $parsedUrl = parse_url($url); -- 2.25.1