diff --git a/typo3/sysext/indexed_search/Classes/Controller/SearchController.php b/typo3/sysext/indexed_search/Classes/Controller/SearchController.php index 5fd1010..5cdf416 100644 --- a/typo3/sysext/indexed_search/Classes/Controller/SearchController.php +++ b/typo3/sysext/indexed_search/Classes/Controller/SearchController.php @@ -235,7 +235,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle } // Print a message telling which words in which sections we searched for if (substr($this->searchData['sections'], 0, 2) == 'rl') { - $result['searchedInSectionInfo'] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('result.inSection', 'indexed_search') . ' "' . substr($this->getPathFromPageId(substr($this->searchData['sections'], 4)), 1) . '"'; + $result['searchedInSectionInfo'] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('result.inSection', 'indexed_search') . ' "' . $this->getPathFromPageId(substr($this->searchData['sections'], 4)) . '"'; } return $result; } @@ -300,7 +300,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle $sectionTitleLinked = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('result.unnamedSection', 'indexed_search') . ':'; } else { $onclick = 'document.' . $this->prefixId . '[\'' . $this->prefixId . '[_sections]\'].value=\'' . $theRLid . '\';document.' . $this->prefixId . '.submit();return false;'; - $sectionTitleLinked = '' . htmlspecialchars($sectionName) . ':'; + $sectionTitleLinked = '' . $sectionName . ':'; } $this->resultSections[$id] = array($sectionName, count($resultRows)); // Add section header @@ -393,7 +393,7 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle } else { $pathId = $row['data_page_id'] ? $row['data_page_id'] : $row['page_id']; $pathMP = $row['data_page_id'] ? $row['data_page_mp'] : ''; - $pathStr = htmlspecialchars($this->getPathFromPageId($pathId, $pathMP)); + $pathStr = $this->getPathFromPageId($pathId, $pathMP); $resultData['path'] = $this->linkPage($pathId, $pathStr, array( 'cHashParams' => $row['cHashParams'], 'data_page_type' => $row['data_page_type'], @@ -1210,8 +1210,8 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle * Returns the path to the page $id * * @param integer $id Page ID - * @param string MP variable content - * @return string Path + * @param string $pathMP variable content + * @return string Path (HTML-escaped) */ protected function getPathFromPageId($id, $pathMP = '') { $identStr = $id . '|' . $pathMP; @@ -1220,7 +1220,11 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle $this->domainRecords[$id] = array(); $rl = $GLOBALS['TSFE']->sys_page->getRootLine($id, $pathMP); $path = ''; - if (is_array($rl) && count($rl)) { + $pageCount = count($rl); + if (is_array($rl) && $pageCount) { + $index = 0; + $pathSeparator = isset($this->conf['pathCharacter']) ? $this->conf['pathCharacter'] : '/'; + $pathSeparators = $GLOBALS['TSFE']->tmpl->splitConfArray(array('separator' => $pathSeparator), $pageCount); foreach ($rl as $k => $v) { // Check fe_user if ($v['fe_group'] && ($v['uid'] == $id || $v['extendToSubpages'])) { @@ -1240,7 +1244,11 @@ class SearchController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionControlle if ($v['uid'] == $GLOBALS['TSFE']->config['rootLine'][0]['uid']) { break; } - $path = '/' . $v['title'] . $path; + $path = $pathSeparators[$index]['separator'] . htmlspecialchars($v['title']) . $path; + $index++; + } + if (isset($this->conf['pathCharacter'])) { + $path .= $pathSeparators[$index]['separator']; } } $this->pathCache[$identStr] = $path; diff --git a/typo3/sysext/indexed_search/ext_typoscript_setup.txt b/typo3/sysext/indexed_search/ext_typoscript_setup.txt index ed15c24..8686709 100755 --- a/typo3/sysext/indexed_search/ext_typoscript_setup.txt +++ b/typo3/sysext/indexed_search/ext_typoscript_setup.txt @@ -11,6 +11,8 @@ plugin.tx_indexedsearch { modified = } + pathCharacter = / |*| / |*| + show { rules = 1 parsetimes = 0