Index: typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format.js =================================================================== --- typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format.js (révision 7564) +++ typo3/sysext/rtehtmlarea/htmlarea/plugins/RemoveFormat/remove-format.js (copie de travail) @@ -44,7 +44,7 @@ * Registering plugin "About" information */ var pluginInformation = { - version : "1.6", + version : "1.7", developer : "Stanislas Rolland", developerUrl : "http://www.sjbr.ca/", copyrightOwner : "Stanislas Rolland", @@ -116,7 +116,7 @@ // 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, ""); // Keep tags, strip attributes - html = html.replace(/ style=\"[^>\"]*\"/gi, "").replace(/ (class|align|cellpadding|cellspacing|frame|bgcolor)=(([^>\s\"]+)|(\"[^>\"]*\"))/gi, ""); + html = html.replace(/[ \t\n\r]+(style|class|align|cellpadding|cellspacing|frame|bgcolor)=\"[^>\"]*\"/gi, ""); } if (param["images"] == true) { @@ -126,11 +126,11 @@ if (param["ms_formatting"] == true) { // Make one line - html = html.replace(/(\r\n|\n|\r)/g, " "); + html = html.replace(/[ \r\n\t]+/g, " "); // Clean up tags html = html.replace(/<(b|strong|i|em|p|li|ul) [^>]*>/gi, "<$1>"); // Keep tags, strip attributes - html = html.replace(/ style=\"[^>\"]*\"/gi, "").replace(/ (class|align)=(([^>\s\"]+)|(\"[^>\"]*\"))/gi, ""); + html = html.replace(/ (style|class|align)=\"[^>\"]*\"/gi, ""); // kill unwanted tags: span, div, ?xml:, st1:, [a-z]:, meta, link html = html.replace(/<\/?span[^>]*>/gi, ""). replace(/<\/?div[^>]*>/gi, ""). @@ -144,8 +144,8 @@ replace(/]*>.*<\/title[^>]*>/gi, ""); // remove comments html = html.replace(/