Remove invisible whitespace pasted by Firefox
authorAlexander Ebert <ebert@woltlab.com>
Mon, 25 Jul 2016 13:48:46 +0000 (15:48 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Mon, 25 Jul 2016 13:48:46 +0000 (15:48 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wmonkeypatch.js

index 334a71d30f2d0d0a0cf9568b74e70bce9023bac1..2e10f1d44705f56463623e1dd7ad7175a9007a1c 100644 (file)
@@ -940,6 +940,9 @@ RedactorPlugins.wmonkeypatch = function() {
                        // link.insert
                        var $mpInsert = this.link.insert;
                        this.link.insert = (function() {
+                               // Firefox: remove any invisible characters present in the url
+                               this.link.$inputUrl[0].value = this.link.$inputUrl[0].value.trim().replace(/\u200B/, '');
+                               
                                $mpInsert.call(this);
                                
                                this.selection.get();