Commit 9f968c37 authored by Benni Mack's avatar Benni Mack
Browse files

[BUGFIX] Keep anchor in legacy link browser for pages

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/+/72935

Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Tested-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Tested-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
Reviewed-by: Oliver Bartsch's avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: Wouter Wolters's avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Stefan Bürk's avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: Benni Mack's avatarBenni Mack <benni@typo3.org>
parent 27940f08
......@@ -152,9 +152,11 @@ class ElementBrowserPageTreeView extends BrowseTreeView
*/
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>';
}
}
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