From c7b2838491519f05792ad15fcaf1d4c7f807817f Mon Sep 17 00:00:00 2001 From: Tim Jungebluth <tim.jungebluth@gmail.com> Date: Wed, 9 Mar 2016 21:21:03 +0100 Subject: [PATCH] [BUGFIX] Unset default link if set with values from other link handler Change-Id: I49a19d9ca4e08cea927f5541accfade09320210d Resolves: #74586 Releases: master, 7.6 Reviewed-on: https://review.typo3.org/47168 Reviewed-by: Daniel Goerz <ervaude@gmail.com> Tested-by: Daniel Goerz <ervaude@gmail.com> Reviewed-by: Markus Klein <markus.klein@typo3.org> Tested-by: Markus Klein <markus.klein@typo3.org> --- .../Classes/Controller/BrowseLinksController.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/typo3/sysext/rtehtmlarea/Classes/Controller/BrowseLinksController.php b/typo3/sysext/rtehtmlarea/Classes/Controller/BrowseLinksController.php index ac3166ac059d..12df3c3a4b4b 100644 --- a/typo3/sysext/rtehtmlarea/Classes/Controller/BrowseLinksController.php +++ b/typo3/sysext/rtehtmlarea/Classes/Controller/BrowseLinksController.php @@ -292,6 +292,12 @@ class BrowseLinksController extends AbstractLinkBrowserController } } } + if (isset($this->linkAttributeValues['class']) + && isset($classesAnchor[$this->displayedLinkHandlerId]) + && !in_array($this->linkAttributeValues['class'], $classesAnchor[$this->displayedLinkHandlerId], true) + ) { + unset($this->linkAttributeValues['class']); + } // Constructing the class selector options foreach ($classesAnchorArray as $class) { if (!in_array($class, $classesAnchor['all']) || in_array($class, $classesAnchor['all']) && is_array($classesAnchor[$this->displayedLinkHandlerId]) && in_array($class, $classesAnchor[$this->displayedLinkHandlerId])) { -- GitLab