Strip nbsp when editing the message source
authorAlexander Ebert <ebert@woltlab.com>
Thu, 20 Dec 2018 15:23:40 +0000 (16:23 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 20 Dec 2018 15:23:40 +0000 (16:23 +0100)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabSource.js

index f2d91794fb4fdaabde9066a9233d50d5dafcb5c9..a56e5294fa86c4d1846a349d42200861a625c3bc 100644 (file)
@@ -96,7 +96,7 @@ $.Redactor.prototype.WoltLabSource = function() {
                                
                                mpShow.call(this);
                                
-                               this.source.$textarea.val(code);
+                               this.source.$textarea.val(code.replace(/&nbsp;/g, ' '));
                                
                                // noinspection JSSuspiciousNameCombination
                                textarea.style.setProperty('height', Math.ceil(height) + 'px', '');