Skip to content

Commit

Permalink
[BUGFIX] Keep anchor in legacy link browser for pages
Browse files Browse the repository at this point in the history
This change keeps the anchor when clicking on a page
in the link browser.

Resolves: #93893
Related: #89033
Releases: main, 11.5
Change-Id: I65a876a4fecf508b810e08116810f3cd73e30c19
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72975
Tested-by: core-ci <typo3@b13.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Benni Mack <benni@typo3.org>
  • Loading branch information
bmack committed Jan 11, 2022
1 parent b5ad778 commit defbd60
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -152,9 +152,11 @@ public function ext_isLinkable($doktype, $uid)
*/
public function PM_ATagWrap($bMark = '', $isOpen = false)
{
$bMark = htmlspecialchars((string)$bMark);
$anchor = $bMark ? '#' . $bMark : '';
$name = $bMark ? ' name=' . $bMark : '';
$urlParameters = $this->linkParameterProvider->getUrlParameters([]);
return '<a class="list-tree-control ' . ($isOpen ? 'list-tree-control-open' : 'list-tree-control-closed')
. '" href="' . htmlspecialchars($this->getThisScript() . HttpUtility::buildQueryString($urlParameters)) . '"' . htmlspecialchars($name) . '><i class="fa"></i></a>';
. '" href="' . htmlspecialchars($this->getThisScript() . HttpUtility::buildQueryString($urlParameters)) . $anchor . '"' . $name . '><i class="fa"></i></a>';
}
}

0 comments on commit defbd60

Please sign in to comment.