[BUGFIX] Make ckeditor link browser not drop CSS-Classes if editing again 39/57439/2
authorFrédéric Lebel <flebel@opval.com>
Wed, 27 Jun 2018 02:57:49 +0000 (02:57 +0000)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 2 Jul 2018 10:57:37 +0000 (12:57 +0200)
Fix the link browser to not drop the CSS-Class value with multiple classes
if editing the same link.

Resolves: #85182
Releases: master, 8.7
Change-Id: Id7819f25c6a456c379de406816e44d7d1d76157e
Reviewed-on: https://review.typo3.org/57439
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/rte_ckeditor/Classes/Controller/BrowseLinksController.php

index 0a149e2..50c3c6e 100644 (file)
@@ -178,14 +178,6 @@ class BrowseLinksController extends AbstractLinkBrowserController
             }
         }
 
-        if (!empty($this->currentLinkParts['class'])) {
-            // Only keep last class value (others are automatically added again by required option)
-            // https://review.typo3.org/#/c/29643
-            $currentClasses = GeneralUtility::trimExplode(' ', $this->currentLinkParts['class'], true);
-            if (count($currentClasses) > 1) {
-                $this->currentLinkParts['class'] = end($currentClasses);
-            }
-        }
         parent::initCurrentUrl();
     }