Fixed pasted code incorrectly treated as HTML
authorAlexander Ebert <ebert@woltlab.com>
Mon, 19 Sep 2016 21:05:58 +0000 (23:05 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 19 Sep 2016 21:06:05 +0000 (23:06 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js

index 373dcab82610b62df7cc6bf9cce427937343ba38..233f8bf4e1be8566a557c46384fac3826709f9ea 100644 (file)
@@ -76,6 +76,10 @@ $.Redactor.prototype.WoltLabClean = function() {
                        
                        var mpOnPaste = this.clean.onPaste;
                        this.clean.onPaste = (function (html, data, insert) {
+                               if (data.pre) {
+                                       return mpOnPaste.call(this, html, data, insert);
+                               }
+                               
                                var div = elCreate('div');
                                div.innerHTML = html;