[BUGFIX] Do not prepend siteUrl in RTE when handler keyword is present 13/44713/3
authorMarkus Klein <markus.klein@typo3.org>
Fri, 13 Nov 2015 21:02:44 +0000 (22:02 +0100)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Sun, 15 Nov 2015 15:08:10 +0000 (16:08 +0100)
Resolves: #71510
Releases: master
Change-Id: I4d7b67dc94c284d0b816aa41578e411ca6c26101
Reviewed-on: https://review.typo3.org/44713
Reviewed-by: Markus Sommer <markussom@posteo.de>
Tested-by: Markus Sommer <markussom@posteo.de>
Reviewed-by: Oliver Eglseder <oliver.eglseder@in2code.de>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
typo3/sysext/rtehtmlarea/Resources/Public/JavaScript/RteLinkBrowser.js

index c5c875e..60b54d4 100644 (file)
@@ -101,8 +101,8 @@ define(['jquery', 'TYPO3/CMS/Recordlist/LinkBrowser'], function($, LinkBrowser)
                        input = 'id=' + input.substr(5);
                }
 
-               // if it's no mail or external link, we always prepend the siteUrl
-               if (input.indexOf('mailto:') !== 0 && !attributes['data-htmlarea-external']) {
+               // if there is no handler keyword (mailto:, record:, etc) or an external link, we always prepend the siteUrl
+               if (!/^\w+:/.test(input) && !attributes['data-htmlarea-external']) {
                        input = RteLinkBrowser.siteUrl + '?' + input;
                }