Fixed bug #17695: htmlArea RTE: Removing format may remove content
authorstan <stan@709f56b5-9817-0410-a4d7-c38de5d9e867>
Tue, 22 Feb 2011 19:14:11 +0000 (19:14 +0000)
committerstan <stan@709f56b5-9817-0410-a4d7-c38de5d9e867>
Tue, 22 Feb 2011 19:14:11 +0000 (19:14 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10541 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/ChangeLog
typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format.js

index 35d71b1..21493f2 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-02-22  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Fixed bug #17695: htmlArea RTE: Removing format may remove content
+
 2011-02-22  Tobias Liebig  <mail_typo3@etobi.de>
 
        * Fixed bug #17653: t3editor: wrong size calculation in Chrome for the code completion window (Thanks to Stephan Petzl)
index 50a7f9c..53973b4 100644 (file)
@@ -1,3 +1,7 @@
+2011-02-22  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Fixed bug #17695: htmlArea RTE: Removing format may remove content
+
 2011-02-20  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Follow-up to issue #17677: htmlArea RTE: Classes configuration is loaded twice
index 0b609ce..f3521bc 100644 (file)
@@ -220,7 +220,7 @@ HTMLArea.RemoveFormat = Ext.extend(HTMLArea.Plugin, {
                        }
                        if (params['formatting']) {
                                        // Remove font, b, strong, i, em, u, strike, span and other inline tags
-                               html = html.replace(/<\/?(abbr|acronym|b[^a-zA-Z]|big|cite|code|em[^a-zA-Z]|font|i[^a-zA-Z]|q|s[^a-zA-Z]|samp|small|span|strike|strong|sub|sup|tt|u[^a-zA-Z]|var)[^>]*>/gi, "");
+                               html = html.replace(/<\/?(abbr|acronym|b|big|cite|code|em|font|i|q|s|samp|small|span|strike|strong|sub|sup|tt|u|var)(>|[^>a-zA-Z][^>]*>)/gi, '');
                                        // Keep tags, strip attributes
                                html = html.replace(/[ \t\n\r]+(style|class|align|cellpadding|cellspacing|frame|bgcolor)=\"[^>\"]*\"/gi, "");
                        }