diff --git a/typo3/sysext/core/Classes/Html/RteHtmlParser.php b/typo3/sysext/core/Classes/Html/RteHtmlParser.php index b29b85c07a65588d5433a4b887d559c659f89433..da895816f79d119358e8363d9449032bc9433e3c 100644 --- a/typo3/sysext/core/Classes/Html/RteHtmlParser.php +++ b/typo3/sysext/core/Classes/Html/RteHtmlParser.php @@ -171,9 +171,6 @@ class RteHtmlParser extends HtmlParser case 'ts_images': $value = $this->TS_images_db($value); break; - case 'ts_reglinks': - $value = $this->TS_reglinks($value, 'db'); - break; case 'ts_links': $value = $this->TS_links_db($value); break; @@ -205,9 +202,6 @@ class RteHtmlParser extends HtmlParser case 'ts_images': $value = $this->TS_images_rte($value); break; - case 'ts_reglinks': - $value = $this->TS_reglinks($value, 'rte'); - break; case 'ts_links': $value = $this->TS_links_rte($value); break; @@ -438,42 +432,6 @@ class RteHtmlParser extends HtmlParser return implode('', $imgSplit); } - /** - * Transformation handler: 'ts_reglinks' / direction: "db"+"rte" depending on $direction variable. - * Converting <A>-tags to/from abs/rel - * - * @param string $value Content input - * @param string $direction Direction of conversion; "rte" (from database to RTE) or "db" (from RTE to database) - * @return string Content output - */ - public function TS_reglinks($value, $direction) - { - $retVal = ''; - switch ($direction) { - case 'rte': - $retVal = $this->TS_AtagToAbs($value, 1); - break; - case 'db': - $siteURL = GeneralUtility::getIndpEnv('TYPO3_SITE_URL'); - $blockSplit = $this->splitIntoBlock('A', $value); - foreach ($blockSplit as $k => $v) { - // Block - if ($k % 2) { - list($attribArray) = $this->get_tag_attributes($this->getFirstTag($v), true); - // If the url is local, remove url-prefix - if ($siteURL && substr($attribArray['href'], 0, strlen($siteURL)) == $siteURL) { - $attribArray['href'] = substr($attribArray['href'], strlen($siteURL)); - } - $bTag = '<a ' . GeneralUtility::implodeAttributes($attribArray, 1) . '>'; - $eTag = '</a>'; - $blockSplit[$k] = $bTag . $this->TS_reglinks($this->removeFirstAndLastTag($blockSplit[$k]), $direction) . $eTag; - } - } - $retVal = implode('', $blockSplit); - break; - } - return $retVal; - } /** * Transformation handler: 'ts_links' / direction: "db" diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-72897-RteHtmlParserDroppedTs_reglinksTransformation.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-72897-RteHtmlParserDroppedTs_reglinksTransformation.rst new file mode 100644 index 0000000000000000000000000000000000000000..4bdd6597ab677f586bd23458795a322702322967 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-72897-RteHtmlParserDroppedTs_reglinksTransformation.rst @@ -0,0 +1,23 @@ +==================================================================== +Breaking: #72897 - RteHtmlParser: Dropped ts_reglinks transformation +==================================================================== + +Description +=========== + +The RTE transformation mode ``ts_reglinks`` which transforms relative links to absolute links when using the Rich Text Editor +was removed, along with the according PHP method ``RteHtmlParser->TS_reglinks()``. + + +Impact +====== + +Using the transformation mode, set via TCA or TSconfig (``RTE.default.proc.mode = ts_reglinks``) will have no effect anymore. + +Calling the PHP method will result in a PHP fatal error. + + +Affected Installations +====================== + +Any installation using obsolete transformation mode or special RTE transformations. \ No newline at end of file