Prevent empty anchor being spawned when editing an image
authorAlexander Ebert <ebert@woltlab.com>
Fri, 3 Jul 2015 10:57:40 +0000 (12:57 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 3 Jul 2015 10:57:40 +0000 (12:57 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js

index 9cf41559cf5a9283e2889e659421a621723afb0c..b34c14fc094ab62e5391a755905d2cff8011eedf 100644 (file)
@@ -658,7 +658,7 @@ RedactorPlugins.wmonkeypatch = function() {
                                                anchor.attr('href', link);
                                        }
                                }
-                               else {
+                               else if (link !== '') {
                                        anchor = document.createElement('a');
                                        anchor.href = link;
                                        image[0].parentNode.insertBefore(anchor, image[0]);