From 0f0d9e0dc7f7545a158e0e01513815d8783d0657 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Tue, 30 Aug 2016 11:43:19 +0200 Subject: [PATCH] Removing spans again --- .../redactor2/plugins/WoltLabClean.js | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js index 383a377908..02c15009cf 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js +++ b/wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js @@ -3,6 +3,10 @@ $.Redactor.prototype.WoltLabClean = function() { return { init: function () { + this.opts.pasteInlineTags = this.opts.pasteInlineTags.filter(function (value) { + return (value !== 'span'); + }); + var mpOnSet = this.clean.onSet; this.clean.onSet = (function (html) { return mpOnSet.call(this, html.replace(/\u200B/g, '')); @@ -10,9 +14,10 @@ $.Redactor.prototype.WoltLabClean = function() { var mpOnSync = this.clean.onSync; this.clean.onSync = (function (html) { - var div, replacements = {}; + var div = elCreate('div'); + var replacements = {}; + if (html.indexOf('