diff --git a/typo3/sysext/core/Classes/Html/RteHtmlParser.php b/typo3/sysext/core/Classes/Html/RteHtmlParser.php index 91f6fb77d45ea3919200a7eb3015354dea76423f..fad46de71c6343102ae9dbf9195766662e9e5cf7 100644 --- a/typo3/sysext/core/Classes/Html/RteHtmlParser.php +++ b/typo3/sysext/core/Classes/Html/RteHtmlParser.php @@ -88,13 +88,6 @@ class RteHtmlParser extends HtmlParser */ public $allowedClasses = array(); - /** - * Set to tags to preserve from Page TSconfig configuration - * - * @var string - */ - public $preserveTags = ''; - /** * Initialize, setting element reference and record PID * @@ -128,7 +121,6 @@ class RteHtmlParser extends HtmlParser // Init: $this->tsConfig = $thisConfig; $this->procOptions = (array)$thisConfig['proc.']; - $this->preserveTags = strtoupper(implode(',', GeneralUtility::trimExplode(',', $this->procOptions['preserveTags']))); // dynamic configuration of blockElementList if ($this->procOptions['blockElementList']) { $this->blockElementList = $this->procOptions['blockElementList']; @@ -185,9 +177,6 @@ class RteHtmlParser extends HtmlParser case 'ts_links': $value = $this->TS_links_db($value); break; - case 'ts_preserve': - $value = $this->TS_preserve_db($value); - break; case 'css_transform': $this->allowedClasses = GeneralUtility::trimExplode(',', $this->procOptions['allowedClasses'], true); // CR has a very disturbing effect, so just remove all CR and rely on LF @@ -222,9 +211,6 @@ class RteHtmlParser extends HtmlParser case 'ts_links': $value = $this->TS_links_rte($value); break; - case 'ts_preserve': - $value = $this->TS_preserve_rte($value); - break; case 'css_transform': // Has a very disturbing effect, so just remove all '13' - depend on '10' $value = str_replace(CR, '', $value); @@ -735,54 +721,6 @@ class RteHtmlParser extends HtmlParser return implode('', $blockSplit); } - /** - * Preserve special tags - * - * @param string $value Content input - * @return string Content output - */ - public function TS_preserve_db($value) - { - if (!$this->preserveTags) { - return $value; - } - // Splitting into blocks for processing (span-tags are used for special tags) - $blockSplit = $this->splitIntoBlock('span', $value); - foreach ($blockSplit as $k => $v) { - // Block - if ($k % 2) { - list($attribArray) = $this->get_tag_attributes($this->getFirstTag($v)); - if ($attribArray['specialtag']) { - $theTag = rawurldecode($attribArray['specialtag']); - $theTagName = $this->getFirstTagName($theTag); - $blockSplit[$k] = $theTag . $this->removeFirstAndLastTag($blockSplit[$k]) . '</' . $theTagName . '>'; - } - } - } - return implode('', $blockSplit); - } - - /** - * Preserve special tags - * - * @param string $value Content input - * @return string Content output - */ - public function TS_preserve_rte($value) - { - if (!$this->preserveTags) { - return $value; - } - $blockSplit = $this->splitIntoBlock($this->preserveTags, $value); - foreach ($blockSplit as $k => $v) { - // Block - if ($k % 2) { - $blockSplit[$k] = '<span specialtag="' . rawurlencode($this->getFirstTag($v)) . '">' . $this->removeFirstAndLastTag($blockSplit[$k]) . '</span>'; - } - } - return implode('', $blockSplit); - } - /** * Transformation handler: 'css_transform' / direction: "db" * Cleaning (->db) for standard content elements (ts) diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-72870-RemovedRTETransformationTs_preserveAndPreserveTags.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-72870-RemovedRTETransformationTs_preserveAndPreserveTags.rst new file mode 100644 index 0000000000000000000000000000000000000000..ab7b22e882a027bd837d8a7642355c113a1afd54 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-72870-RemovedRTETransformationTs_preserveAndPreserveTags.rst @@ -0,0 +1,34 @@ +========================================================================== +Breaking: #72870 - Removed RTE transformation ts_preserve and preserveTags +========================================================================== + +Description +=========== + +The RTE configuration TSconfig option ``RTE.default.proc.preserveTags`` to preserve special tags was removed. + +The RTE transformation mode "ts_preserve" to change special preserved tags and migrate to <span> tags was removed. + +The according methods ``TS_preserve_db`` and ``TS_preserve_rte`` within RteHtmlParser were removed. + + +Impact +====== + +Setting the TSconfig option or the RTE transformation mode has no effect anymore. + +Calling the removed PHP methods directly will result in fatal PHP errors. + + +Affected Installations +====================== + +TYPO3 instances with custom RTE transformations using the removed "ts" transformation mode, or a custom transformation mode. + + +Migration +========= + +Use the RTE processing option "RTE.default.proc.allowTags" to include the tags without rewriting them to custom <span> tags. + +If special handling is still necessary, an existing hook can be used to re-implement the logic. \ No newline at end of file