From b1d5cafb6495e42f7e0059fa9f5611c945ebcc6f Mon Sep 17 00:00:00 2001 From: Stanislas Rolland Date: Mon, 6 Apr 2009 14:26:35 +0000 Subject: [PATCH] Follow-up to issue #10834: htmlArea RTE: IE8 now uses standard name for DOM class attribute git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5291 709f56b5-9817-0410-a4d7-c38de5d9e867 --- ChangeLog | 4 ++++ typo3/sysext/rtehtmlarea/ChangeLog | 4 ++++ .../htmlarea/plugins/DefaultClean/default-clean.js | 11 ++++++++++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 101cc6aa27d3..fe6e91854fa2 100755 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-04-06 Stanislas Rolland + + * Follow-up to issue #10834: htmlArea RTE: IE8 now uses standard name for DOM class attribute + 2009-04-06 Oliver Hader * Follow-up to feature #9703: Admin panel cannot not be dragged diff --git a/typo3/sysext/rtehtmlarea/ChangeLog b/typo3/sysext/rtehtmlarea/ChangeLog index a6206edc9692..754f2727b638 100644 --- a/typo3/sysext/rtehtmlarea/ChangeLog +++ b/typo3/sysext/rtehtmlarea/ChangeLog @@ -1,3 +1,7 @@ +2009-04-06 Stanislas Rolland + + * Follow-up to issue #10834: htmlArea RTE: IE8 now uses standard name for DOM class attribute + 2009-04-05 Stanislas Rolland * Follow-up to issue #10834: htmlArea RTE: IE8 now uses standard name for DOM class attribute diff --git a/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/default-clean.js b/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/default-clean.js index e9fa2a21a674..da924c874c22 100644 --- a/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/default-clean.js +++ b/typo3/sysext/rtehtmlarea/htmlarea/plugins/DefaultClean/default-clean.js @@ -97,7 +97,16 @@ DefaultClean = HTMLArea.Plugin.extend({ var newc = node.className.replace(/(^|\s)mso.*?(\s|$)/ig,' '); if(newc != node.className) { node.className = newc; - if(!/\S/.test(node.className)) node.removeAttribute("className"); + if(!/\S/.test(node.className)) { + if (!HTMLArea.is_opera) { + node.removeAttribute("class"); + if (HTMLArea.is_ie) { + node.removeAttribute("className"); + } + } else { + node.className = ''; + } + } } } function clearStyle(node) { -- 2.20.1