Fixed link pasting
authorAlexander Ebert <ebert@woltlab.com>
Fri, 8 Sep 2017 15:30:25 +0000 (17:30 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 8 Sep 2017 15:30:25 +0000 (17:30 +0200)
Fixes #2417

wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js

index 42695ddde3392ef64e9000a6c179e38d13c0d237..e8b9be81d03f4cd80df63364c8623550cc14a24a 100644 (file)
@@ -360,7 +360,7 @@ $.Redactor.prototype.WoltLabClean = function() {
                                if (data.links && this.opts.pasteLinks) {
                                        elBySelAll('a', div, function(link) {
                                                if (link.href) {
-                                                       link.outerHTML = '##%a href="' + link.href + '"%##' + link.innerHTML + '##%/a%##';
+                                                       link.outerHTML = '##%%a href="' + link.href + '"%%##' + link.innerHTML + '##%%/a%##';
                                                }
                                        });
                                        
@@ -372,7 +372,7 @@ $.Redactor.prototype.WoltLabClean = function() {
                                if (data.images && this.opts.pasteImages) {
                                        elBySelAll('img', div, function(image) {
                                                if (image.src) {
-                                                       var tmp = '##%img src="' + image.src + '"';
+                                                       var tmp = '##%%img src="' + image.src + '"';
                                                        var attr;
                                                        for (var j = 0, length = image.attributes.length; j < length; j++) {
                                                                attr = image.attributes.item(j);
@@ -381,7 +381,7 @@ $.Redactor.prototype.WoltLabClean = function() {
                                                                }
                                                        }
                                                        
-                                                       image.outerHTML = tmp + '%##';
+                                                       image.outerHTML = tmp + '%%##';
                                                }
                                        });