Fix highlighter selection of MESSAGE_PUBLIC_HIGHLIGHTERS is empty
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 29 Nov 2018 14:53:35 +0000 (15:53 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 29 Nov 2018 14:53:54 +0000 (15:53 +0100)
see #2752

com.woltlab.wcf/templates/wysiwyg.tpl

index e71298456b9ea22fa5c426807c37858d1d1cf7c4..c944243280e9075623da294ab928e480abda8d9c 100644 (file)
                        var allowedInlineStyles = [], buttons = [], buttonMobile = [], buttonOptions = [], customButtons = [];
                        {include file='wysiwygToolbar'}
                        
-                       var highlighters = '{@MESSAGE_PUBLIC_HIGHLIGHTERS|encodeJS}'.split(/\n/);
+                       var highlighters = '{@MESSAGE_PUBLIC_HIGHLIGHTERS|encodeJS}'.split(/\n/).filter(function (item) { return item != ''; });
                        
                        {include file='mediaJavaScript'}