[BUGFIX] Preserve parameters for email links in RTE 59/47459/2
authorMarkus Klein <markus.klein@typo3.org>
Wed, 30 Mar 2016 23:55:39 +0000 (01:55 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 31 Mar 2016 12:40:22 +0000 (14:40 +0200)
Resolves: #75326
Releases: master, 7.6
Change-Id: Ia856ef5c2eb90cad5ea925507e52a1ec60a03c95
Reviewed-on: https://review.typo3.org/47459
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/rtehtmlarea/Classes/Controller/BrowseLinksController.php

index 12df3c3..addd26d 100644 (file)
@@ -223,13 +223,11 @@ class BrowseLinksController extends AbstractLinkBrowserController
             }
         }
 
-        if (empty($this->currentLinkParts['data-htmlarea-external'])) {
+        if (empty($this->currentLinkParts['data-htmlarea-external']) && strpos($this->currentLinkParts['url'], 'mailto:') === false) {
             // strip siteUrl prefix except for external and mail links
-            if (strpos($this->currentLinkParts['url'], 'mailto:') === false) {
-                $paramsPosition = strpos($this->currentLinkParts['url'], '?');
-                if ($paramsPosition !== false) {
-                    $this->currentLinkParts['url'] = substr($this->currentLinkParts['url'], $paramsPosition + 1);
-                }
+            $paramsPosition = strpos($this->currentLinkParts['url'], '?');
+            if ($paramsPosition !== false) {
+                $this->currentLinkParts['url'] = substr($this->currentLinkParts['url'], $paramsPosition + 1);
             }
             // special treatment for page links, remove the id= part
             $idPosition = strpos($this->currentLinkParts['url'], 'id=');