[BUGFIX] htmlArea RTE: CSS class names are lowercase in WebKit
authorStanislas Rolland <typo3@sjbr.ca>
Fri, 10 Feb 2012 01:37:05 +0000 (20:37 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Fri, 10 Feb 2012 01:39:03 +0000 (02:39 +0100)
Problem: See https://bugs.webkit.org/show_bug.cgi?id=55619
Solution: Add doctype to the iframe source

Change-Id: Ib775e836403d9711db4585b84351c700f1eec65c
Resolves: #32408
Releases: 4.5, 4.6, 4.7
Reviewed-on: http://review.typo3.org/8950
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
typo3/sysext/rtehtmlarea/htmlarea/htmlarea.js

index 020c2fd..eecff11 100644 (file)
@@ -146,6 +146,7 @@ HTMLArea.Config = function (editorId) {
        this.documentType = '<!DOCTYPE html\r'
                        + '    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"\r'
                        + '    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\r';
+       this.blankDocument = '<html><head></head><body></body></html>';
                // Hold the configuration of buttons and hot keys registered by plugins
        this.buttonsConfig = {};
        this.hotKeyList = {};
@@ -2096,7 +2097,7 @@ HTMLArea.Editor = Ext.extend(Ext.util.Observable, {
                                                id: this.editorId + '-iframe',
                                                tag: 'iframe',
                                                cls: 'editorIframe',
-                                               src: (Ext.isGecko || Ext.isWebKit) ? 'javascript:void(0);' : HTMLArea.editorUrl + 'popups/blank.html'
+                                               src: Ext.isGecko ? 'javascript:void(0);' : (Ext.isWebKit ? 'javascript: \'' + HTMLArea.htmlEncode(this.config.documentType + this.config.blankDocument) + '\'' : HTMLArea.editorUrl + 'popups/blank.html')
                                        },
                                        isNested: this.isNested,
                                        nestedParentElements: this.nestedParentElements,