Fix issue when inserting quotes in Firefox
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 1 Aug 2013 23:57:34 +0000 (01:57 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 1 Aug 2013 23:57:34 +0000 (01:57 +0200)
cf. http://beta.woltlab.com/index.php/Thread/2832-Fehler-durch-Zitieren/

wcfsetup/install/files/js/3rdParty/ckeditor/plugins/wbbcode/plugin.js
wcfsetup/install/files/js/WCF.Message.js

index e88d4139380ff6fb65b86c9b6891ba71941f55a6..d18f13902ac92df9a471d3200b6cf0f4b0959fcd 100644 (file)
         * Converts bbcodes to html.
         */
        var toHtml = function(data, fixForBody) {
+               if ($.trim(data) === "") return "<p></p>";
+               
                // remove 0x200B (unicode zero width space)
                data = removeCrap(data);
                
index dc5f1c6d4e096f2b974df8de841e313b663cf2dd..fc98f5eec9f6e036cd14d63b328665ac29a719f5 100644 (file)
@@ -693,7 +693,7 @@ WCF.Message.QuickReply = Class.extend({
                                        $empty = (!this._messageField.val().length);
                                }
                                else {
-                                       $empty = (!this._messageField.ckeditorGet().getData().length);
+                                       $empty = (!$.trim(this._messageField.ckeditorGet().getData()).length);
                                }
                                
                                if ($empty) {