From a6931610a72f5c15dd58c4c6f52b6a244af403b7 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 26 Apr 2015 17:27:19 +0200 Subject: [PATCH] Properly stripping CSS class names from
,

and on paste --- .../install/files/js/3rdParty/redactor/plugins/wbbcode.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js index 5c2aa24c50..e6f930857f 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wbbcode.js @@ -1522,6 +1522,11 @@ RedactorPlugins.wbbcode = function() { html = html.replace(/<\/(div|p)><\/(div|p)>/g, '

'); //html = html.replace(/<(div|p)>
<\/(div|p)>/g, '

'); + // strip classes from certain elements + html = html.replace(/<(?:div|p|span)[^>]+>/gi, function(match) { + return match.replace(/ class="[^"]+"/, ''); + }); + // drop html = html.replace(/<\/?wbr[^>]*>/g, ''); -- 2.20.1