From: Alexander Ebert Date: Sun, 26 Apr 2015 15:27:19 +0000 (+0200) Subject: Properly stripping CSS class names from
,

and on paste X-Git-Tag: 2.1.4~44^2~3 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a6931610a72f5c15dd58c4c6f52b6a244af403b7;p=GitHub%2FWoltLab%2FWCF.git Properly stripping CSS class names from

,

and on paste --- 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, '');