Slightly improved code
authorAlexander Ebert <ebert@woltlab.com>
Sat, 15 Oct 2016 14:34:22 +0000 (16:34 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sat, 15 Oct 2016 14:34:29 +0000 (16:34 +0200)
wcfsetup/install/files/js/3rdParty/redactor2/plugins/WoltLabClean.js
wcfsetup/install/files/lib/system/html/input/HtmlInputProcessor.class.php

index 79cc34967c2fdc6c18de5d801109498ae888dcc6..38346dcc002725aca85989d1984499f67f7f3794 100644 (file)
@@ -162,7 +162,7 @@ $.Redactor.prototype.WoltLabClean = function() {
                        this.clean.convertTags = (function(html, data) {
                                var div = elCreate('div');
                                div.innerHTML = html;
-                               console.debug(html);
+                               
                                // reset tag storage
                                storage = [];
                                
index a17539ee31a0a5890942bc32cf2c18fcaa3424ad..2daf141d14af59c555128ad3996b2df6227c20c5 100644 (file)
@@ -197,9 +197,9 @@ class HtmlInputProcessor extends AbstractHtmlProcessor {
                                                $openParagraph = false;
                                        }
                                        
-                                       // ignore two newline because a new paragraph with bbcodes is created
+                                       // ignore one newline because a new paragraph with bbcodes is created
                                        // using two subsequent newlines
-                                       $newlines -= 1;
+                                       $newlines--;
                                        if ($newlines === 0) {
                                                continue;
                                        }