diff --git a/typo3/sysext/core/Classes/Html/RteHtmlParser.php b/typo3/sysext/core/Classes/Html/RteHtmlParser.php index 6913726fde6508a294536435eea5ac34ee8a1ee1..09190c8131a09b69127b9fbc02cb117199723c33 100644 --- a/typo3/sysext/core/Classes/Html/RteHtmlParser.php +++ b/typo3/sysext/core/Classes/Html/RteHtmlParser.php @@ -242,9 +242,6 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser $value = preg_replace('/<p> <\/p>$/', '<p> </p>' . '<p> </p>', $value); $value = $this->TS_transform_db($value, $cmd == 'css_transform'); break; - case 'ts_strip': - $value = $this->TS_strip_db($value); - break; default: // Do nothing } @@ -1022,19 +1019,6 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser return implode(LF, $blockSplit); } - /** - * Transformation handler: 'ts_strip' / direction: "db" - * Removing all non-allowed tags - * - * @param string $value Content input - * @return string Content output - */ - public function TS_strip_db($value) - { - $value = strip_tags($value, '<' . implode('><', explode(',', 'b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote')) . '>'); - return $value; - } - /*************************************************************** * * Generic RTE transformation, analysis and helper functions @@ -1378,7 +1362,7 @@ class RteHtmlParser extends \TYPO3\CMS\Core\Html\HtmlParser /** * Remove all tables from incoming code - * The function is trying to to this is some more or less respectfull way. The approach is to resolve each table cells content and implode it all by <br /> chars. Thus at least the content is preserved in some way. + * The function is trying to do this in a more or less respectful way. The approach is to resolve each table cells content and implode it all by <br /> chars. Thus at least the content is preserved in some way. * * @param string $value Input value * @param string $breakChar Break character to use for linebreaks. diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-72661-RTETransformationTs_stripRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-72661-RTETransformationTs_stripRemoved.rst new file mode 100644 index 0000000000000000000000000000000000000000..054ac48aac0b42e2ceb3184735dbe2e4a34f2391 --- /dev/null +++ b/typo3/sysext/core/Documentation/Changelog/master/Breaking-72661-RTETransformationTs_stripRemoved.rst @@ -0,0 +1,31 @@ +====================================================== +Breaking: #72661 - RTE Transformation ts_strip removed +====================================================== + +Description +=========== + +The Rich Text Editor transformation that removes all HTML tags except a hard-coded white-list of allowed +HTML tags when saving data from the RTE to the database - called ``ts_strip`` - was removed. + + +Impact +====== + +Using the command ``ts_strip`` in the list of transformations via PageTSconfig or TCA directly will result in keeping +the HTML tags inside the database. + + +Affected Installations +====================== + +TYPO3 installations that use ``ts_strip`` explicitly in their TSconfig options, or instances with extensions that set this +option. + + +Migration +========= + +Use TSconfig options like ``RTE.default.removeTags`` to specify which tags should be removed when saving data +to the database, or even better ``RTE.default.proc.allowTags`` which tags are whitelisted to the database together +with the default RTE processing command ``ts_css``. \ No newline at end of file