Fixed bug #15250: htmlArea RTE: FE additionalJS_post javascript may be displayed...
authorStanislas Rolland <typo3@sjbr.ca>
Tue, 27 Jul 2010 17:45:48 +0000 (17:45 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Tue, 27 Jul 2010 17:45:48 +0000 (17:45 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8286 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js

index 21ec6cc..826fa4f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2010-07-27  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #15244: htmlArea RTE: textearea Id may not be unique in FE
+       * Fixed bug #15250: htmlArea RTE: FE additionalJS_post javascript may be displayed as HTML text
 
 2010-07-27  Xavier Perseguers  <typo3@perseguers.ch>
 
index cee0fe5..0b45efb 100644 (file)
@@ -1,6 +1,7 @@
 2010-07-27  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #15244: htmlArea RTE: textearea Id may not be unique in FE
+       * Fixed bug #15250: htmlArea RTE: FE additionalJS_post javascript may be displayed as HTML text
 
 2010-07-26  Stanislas Rolland  <typo3@sjbr.ca>
 
index a9ff793..9675b2d 100644 (file)
@@ -2390,19 +2390,21 @@ HTMLArea.Editor = Ext.extend(Ext.util.Observable, {
                        sorted: HTMLArea.util.TYPO3.simplifyNested(this.config.tceformsNested)
                };
                this.isNested = !Ext.isEmpty(this.nestedParentElements.sorted);
-                       // Get width of wizards
-               this.wizards = this.textArea.parent().parent().next();
-               if (this.wizards) {
-                       if (!this.isNested || HTMLArea.util.TYPO3.allElementsAreDisplayed(this.nestedParentElements.sorted)) {
-                               this.textAreaInitialSize.wizardsWidth = this.wizards.getWidth();
-                       } else {
-                                       // Clone the array of nested tabs and inline levels instead of using a reference as HTMLArea.util.TYPO3.accessParentElements will modify the array
-                               var parentElements = [].concat(this.nestedParentElements.sorted);
-                                       // Walk through all nested tabs and inline levels to get correct size
-                               this.textAreaInitialSize.wizardsWidth = HTMLArea.util.TYPO3.accessParentElements(parentElements, 'args[0].getWidth()', [this.wizards]);
+                       // If in BE, get width of wizards
+               if (Ext.get('typo3-docheader')) {
+                       this.wizards = this.textArea.parent().parent().next();
+                       if (this.wizards) {
+                               if (!this.isNested || HTMLArea.util.TYPO3.allElementsAreDisplayed(this.nestedParentElements.sorted)) {
+                                       this.textAreaInitialSize.wizardsWidth = this.wizards.getWidth();
+                               } else {
+                                               // Clone the array of nested tabs and inline levels instead of using a reference as HTMLArea.util.TYPO3.accessParentElements will modify the array
+                                       var parentElements = [].concat(this.nestedParentElements.sorted);
+                                               // Walk through all nested tabs and inline levels to get correct size
+                                       this.textAreaInitialSize.wizardsWidth = HTMLArea.util.TYPO3.accessParentElements(parentElements, 'args[0].getWidth()', [this.wizards]);
+                               }
+                                       // Hide the wizards so that they do not move around while the editor framework is being sized
+                               this.wizards.hide();
                        }
-                               // Hide the wizards so that they do not move around while the editor framework is being sized
-                       this.wizards.hide();
                }
                        // Plugins register
                this.plugins = {};
@@ -2771,9 +2773,11 @@ HTMLArea.Editor = Ext.extend(Ext.util.Observable, {
                }, this);
                this.purgeListeners();
                        // Cleaning references to DOM in order to avoid IE memory leaks
-               this.wizards.dom = null;
-               this.textArea.parent().parent().dom = null;
-               this.textArea.parent().dom = null;
+               if (this.wizards) {
+                       this.wizards.dom = null;
+                       this.textArea.parent().parent().dom = null;
+                       this.textArea.parent().dom = null;
+               }
                this.textArea.dom = null;
                RTEarea[this.editorId].editor = null;
        }