[BUGFIX] Prevent Javascript error for Flexform sections 56/45356/5
authorOliver Hader <oliver@typo3.org>
Fri, 18 Dec 2015 15:10:34 +0000 (16:10 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 18 Dec 2015 21:59:46 +0000 (22:59 +0100)
This patch resolves a regression which occurs on deleting
Flexform sections with an RTE.

Resolves: #72322
Releases: 6.2
Change-Id: I620d8701eb8fccb277d0ba58d7c8e3551c463db2
Reviewed-on: https://review.typo3.org/45356
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
typo3/sysext/backend/Classes/Form/FormEngine.php

index 238684c..7186508 100644 (file)
@@ -3382,7 +3382,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                                                                . htmlspecialchars('data[' . $table . '][' . $row['uid'] . '][' . $field . ']' . $formPrefix . '[_TOGGLE]')
                                                                . '" value="' . ($toggleClosed ? 1 : 0) . '" />
                                                                </div>';
-                                                       $output = str_replace('/*###REMOVE###*/', GeneralUtility::slashJS(htmlspecialchars(implode('', $this->additionalJS_delete))), $output);
+                                                       $output = str_replace('/*###REMOVE###*/', htmlspecialchars(implode('', $this->additionalJS_delete), ENT_QUOTES), $output);
                                                        // NOTICE: We are saving the toggle-state directly in the flexForm XML and "unauthorized"
                                                        // according to the data structure. It means that flexform XML will report unclean and
                                                        // a cleaning operation will remove the recorded togglestates. This is not a fatal problem.