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
$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;
$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']) {
// url (external): if has scheme or if a '.' comes before a '/'.
$href = $link_param;
if (!$pU['scheme']) {