From 7c930daed9ee71862c2f7e9e4a1674587086d2ad Mon Sep 17 00:00:00 2001 From: Alexander Stehlik Date: Tue, 18 Feb 2014 10:55:05 +0100 Subject: [PATCH] [BUGFIX] Treat link handler links as internal URLs The RteHtmlParser will now check if a scheme found by parse_url() matches a configured typolinkLinkHandler. If this is the case the link will be treated as internal. Resolves: #49036 Releases: 6.3, 6.2, 6.1 Change-Id: Ie4e6bded7a1c4d0c61e4f1a20bc23115612c1519 Reviewed-on: https://review.typo3.org/30975 Reviewed-by: Markus Klein Tested-by: Markus Klein --- typo3/sysext/core/Classes/Html/RteHtmlParser.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/typo3/sysext/core/Classes/Html/RteHtmlParser.php b/typo3/sysext/core/Classes/Html/RteHtmlParser.php index a08ce6a0b57a..18713ae94c69 100644 --- a/typo3/sysext/core/Classes/Html/RteHtmlParser.php +++ b/typo3/sysext/core/Classes/Html/RteHtmlParser.php @@ -726,7 +726,13 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser { $rFD_fI = pathinfo($rootFileDat); if (trim($rootFileDat) && !strstr($link_param, '/') && (@is_file((PATH_site . $rootFileDat)) || GeneralUtility::inList('php,html,htm', strtolower($rFD_fI['extension'])))) { $href = $siteUrl . $link_param; - } elseif ($pU['scheme'] || $urlChar && (!$fileChar || $urlChar < $fileChar)) { + } elseif ( + ( + $pU['scheme'] + && !isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_content.php']['typolinkLinkHandler'][$pU['scheme']]) + ) + || $urlChar && (!$fileChar || $urlChar < $fileChar) + ) { // url (external): if has scheme or if a '.' comes before a '/'. $href = $link_param; if (!$pU['scheme']) { -- 2.20.1