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

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

index a65900f..6766e1c 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-11  Christian Kuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #16534: Exception message for missing memcache wrong
index 3d62cf9..a6c3c86 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-01-21  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #17160: htmlArea RTE: Link editing problems in Internet Explorer
index 9985eef..d404378 100644 (file)
@@ -114,7 +114,7 @@ RemoveFormat = HTMLArea.Plugin.extend({
 
                                if (param["formatting"] == true) {
                                                // 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, "");
                                }