/gi,"[tr]\n");m=m.replace(/<\/tr>/gi,"[/tr]\n");m=m.replace(/([\s\S]*?)<\/td>/gi,"[td][align=$1]$2[/align][/td]");m=m.replace(/(\t)* | (\t)*/gi,"[td]");m=m.replace(/(\t)*<\/td>/gi,"[/td]\n");var w={};m.replace(/<\/span>/,function(z){var A=z.hashCode();w[A]=z.replace(/\$/g,"$$$$");return"@@"+A+"@@"});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","convertFromHtml",{html:m});m=m.replace(/<[^>]+>/g,"");if($.getLength(w)){for(var j in w){var t=new RegExp("@@"+j+"@@","g");data=data.replace(t,w[j])}}m=m.replace(/</g,"<");m=m.replace(/>/g,">");m=m.replace(/&/g,"&");m=m.replace(/%28/g,"(");m=m.replace(/%29/g,")");var r={};for(var a=0,i=__REDACTOR_SOURCE_BBCODES.length;a/g,">");var b={};for(var n=0,k=__REDACTOR_SOURCE_BBCODES.length;n$1');f=f.replace(/\[url\='([^'"]+)'](.+?)\[\/url]/gi,'$2');f=f.replace(/\[url\=([^'"\]]+)](.+?)\[\/url]/gi,'$2');f=f.replace(/\[email\]([^"]+?)\[\/email]/gi,'$1');f=f.replace(/\[email\=([^"\]]+)](.+?)\[\/email]/gi,'$2');f=f.replace(/\[b\](.*?)\[\/b]/gi,"$1");f=f.replace(/\[i\](.*?)\[\/i]/gi,"$1");f=f.replace(/\[u\](.*?)\[\/u]/gi,"$1");f=f.replace(/\[s\](.*?)\[\/s]/gi,"$1");f=f.replace(/\[sub\](.*?)\[\/sub]/gi,"$1");f=f.replace(/\[sup\](.*?)\[\/sup]/gi,"$1");f=f.replace(/\[img\]([^"]+?)\[\/img\]/gi,'');f=f.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi,'');f=f.replace(/\[img='?([^"]*?)'?\]\[\/img\]/gi,'');f=f.replace(/\[size=(\d+)\](.*?)\[\/size\]/gi,'$2');f=f.replace(/\[color=([#a-z0-9]*?)\](.*?)\[\/color\]/gi,'$2');f=f.replace(/\[font='?([a-z,\- ]*?)'?\](.*?)\[\/font\]/gi,'$2');f=f.replace(/\[align=(left|right|center|justify)\](.*?)\[\/align\]/gi,'$2 ');f=f.replace(/\[\*\](.*?)(?=\[\*\]|\[\/list\])/gi,"$1");f=f.replace(/\[list\]/gi,"");f=f.replace(/\[list=1\]/gi,'');f=f.replace(/\[list=a\]/gi,'');f=f.replace(/\[list=(none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)\]/gi,'');f=f.replace(/\[\/list]/gi," ");f=f.replace(/\[table\]([\S\s]*?)\[\/table\]/gi,function(p,q){return"[table]"+$.trim(q)+"[/table]"});f=f.replace(/\[table\]/gi,'');f=f.replace(/\[\/table\]/gi," ");f=f.replace(/\[tr\]/gi,"");f=f.replace(/\[\/tr\]/gi," ");f=f.replace(/\[td\]/gi,"");f=f.replace(/\[\/td\]/gi," | ");f=f.replace(/([\S\s]*?)<\/td>/gi,function(p,r){var q=$.trim(r);if(!q.length){q=""}return" | "+q+" | "});var h=this.getOption("wAttachmentUrl");if(h){var l=this._getImageAttachmentIDs();f=f.replace(/\[attach=(\d+)\]\[\/attach\]/g,function(p,q){q=parseInt(q);if(WCF.inArray(q,l)){return''}return p})}for(var o in __REDACTOR_SMILIES){$smileyCode=o.replace(//g,">");var i=new RegExp("(\\s|>|^)"+WCF.String.escapeRegExp($smileyCode)+"(?=\\s|<|$)","gi");f=f.replace(i,'$1')}f=f.replace(/(javascript):/gi,"$1:");f=f.replace(/(\r|\r\n)/,"\n");var a=f.split("\n");f="";for(var n=0,k=a.length;n"}f+=""+m+" "}}if($.getLength(b)){for(var g in b){var j=new RegExp("@@"+g+"@@","g");f=f.replace(j,b[g])}f=f.replace(/\[tt\](.*?)\[\/tt\]/gi,'$1')}f=f.replace(/\[code\][\S\s]*?\[\/code\]/,"$& ");var e=function(p){return p.replace(/^['"]/,"").replace(/['"]$/,"")};f=f.replace(/\[quote([^\]]+)?\]/gi,$.proxy(function(r,q){var s="";var p="";if(q){q=q.substr(1);q=q.split(",");switch(q.length){case 1:s=q[0];break;case 2:s=q[0];p=q[1];break}s=WCF.String.escapeHTML(e($.trim(s)));p=WCF.String.escapeHTML(e($.trim(p)))}var t=''+this._buildQuoteHeader(s,p)+'';return t},this));f=f.replace(/\[\/quote\]/gi," ");f=f.replace(/<\/p>/," ");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:f});this.$source.val(f)},_wPasteBeforeCallback:function(a){var b={1:24,2:22,3:18,4:14,5:12,6:10};a=a.replace(/]+>/g,function(c,d){return"[size="+b[d]+"]"});a=a.replace(/<\/h[1-6]>/g,"[/size]");a=a.replace(/<(article|header)[^>]+>/g,"");a=a.replace(/<\/(article|header)>/g," ");a=a.replace(/<(div|p)([^>]+)?><(div|p)([^>]+)?>/g,"");a=a.replace(/<\/(div|p)><\/(div|p)>/g," @@@wcf_break@@@");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:a});return a},_wPasteAfterCallback:function(a){a=a.replace(/([\s\S]*?)<\/p>/g," $1
");a=a.replace(/]*>/g,"");a=a.replace(/<\/header>/g,"");a=a.replace(/.*?<\/div>/g," $1 ");a=a.replace(/<\/?div>/g,"");a=a.replace(/@@@wcf_break@@@/g,"
");a=a.replace(/ /g," ");a=a.replace(/\[size=(\d+)\]/g,'
');a=a.replace(/\[\/size\]/g,"
");a=a.replace(/ ]+)>/g,function(b,c){b=b.replace(/data-mozilla-paste-image="0"/,'data-mozilla-paste-image="0" style="display:none"');return b});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterPaste",{html:a});return a},insertAttachment:function(d){d=parseInt(d);var b=this.getOption("wAttachmentUrl");var c="[attach="+d+"][/attach]";var a=this._getImageAttachmentIDs();if(b&&WCF.inArray(d,a)){this.insertDynamic(' ',c)}else{this.insertDynamic(c)}},_getImageAttachmentIDs:function(){var a=this.getOption("wAttachmentImageIDs")||[];if(a.length){delete this.opts.wAttachmentImageIDs;return a}var b={imageAttachmentIDs:[]};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$source.wcfIdentify(),b);return b.imageAttachmentIDs},_wKeydownCallback:function(a){if(a.which===this.keyCode.DOWN){var b=this.getParent();var c=(b)?$(b).closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};if(b&&c.length){this.insertAfterLastElement($(parent)[0],c[0])}return false}return true},_observeQuotes:function(){this.$editor.find(".redactorQuoteEdit:not(.jsRedactorQuoteEdit)").addClass("jsRedactorQuoteEdit").click($.proxy(this._observeQuotesClick,this))},_observeQuotesClick:function(d){var b=$(d.currentTarget).closest("header");var c=$(' ');$(' '+WCF.Language.get("wcf.bbcode.quote.edit")+"").click($.proxy(function(f){f.preventDefault();this._openQuoteEditOverlay($(d.currentTarget).closest("blockquote.quoteBox"),false);$(".redactor-link-tooltip").remove()},this)).appendTo(c);var a=b.offset();c.css({left:a.left+"px",top:(a.top+20)+"px"});$(".redactor-link-tooltip").remove();c.appendTo(document.body)},_openQuoteEditOverlay:function(a,b){this.modalInit(WCF.Language.get("wcf.bbcode.quote."+(b?"insert":"edit")),this.opts.modal_quote,300,$.proxy(function(){if(!b){$("#redactorQuoteAuthor").val(a.data("author"));$("#redactorQuoteLink").val(a.attr("cite"))}$("#redactorEditQuote").click($.proxy(function(){var c=$("#redactorQuoteAuthor").val();a.data("author",c);a.attr("data-author",c);a.prop("cite",WCF.String.escapeHTML($("#redactorQuoteLink").val()));this._updateQuoteHeader(a);this.modalClose()},this))},this))},_updateQuoteHeader:function(b){var c=b.data("author");var a=b.attr("cite");if(a){a=WCF.String.escapeHTML(a)}b.find("> div > header > h3").empty().append(this._buildQuoteHeader(c,a))},insertQuoteBBCode:function(b,d){if(this.inWysiwygMode()){var a=' '+this._buildQuoteHeader(b,d)+'';+' '+this.opts.invisibleSpace+"
";this.insertHtml(a)}else{var c="[quote][/quote]";if(b){if(d){c="[quote='"+b+"','"+d+"'][/quote]"}else{c="[quote='"+b+"'][/quote]"}}this.insertAtCaret(c)}},_buildQuoteHeader:function(b,c){var a="";if(!b&&c){b=c;c=""}if(b){if(c){a+=' '}a+=WCF.Language.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:WCF.String.unescapeHTML(b)});if(c){a+=""}}else{a=" "+WCF.Language.get("wcf.bbcode.quote.title.clickToSet")+""}return a},_handleInsertQuote:function(){this._openQuoteEditOverlay(null,true)}};
// wbutton.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbutton={_bbcodes:{},init:function(){this._bbcodes={};for(var g=0,d=__REDACTOR_BUTTONS.length;g ").append(d).insertAfter(this.buttonGet(c).parent());if(a!==null){this.buttonAwesome(b,a)}},_addBBCodeButton:function(b){var c="__wcf_"+b.name;var a=this.buttonAdd(c,b.label,this._insertBBCode);this._bbcodes[c]=b.name;if(b.icon.match(/^fa\-[a-z\-]+$/)){this.buttonAwesome(c,b.icon)}else{a.css("background-image","url("+__REDACTOR_ICON_PATH+b.icon+")")}},_insertBBCode:function(a,f,b,e){var d=this._bbcodes[a];var c=this.getSelectionHtml();if(d==="tt"){var g=(this.getParent())?$(this.getParent()):null;if(g&&g.closest("inline.inlineCode",this.$editor.get()[0]).length){this.inlineRemoveClass("inlineCode")}else{this.inlineSetClass("inlineCode")}}else{this.insertHtml("["+d+"]"+c+"[/"+d+"]");this.sync()}e.preventDefault();return false}};
+if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbutton={_bbcodes:{},init:function(){this._bbcodes={};for(var g=0,d=__REDACTOR_BUTTONS.length;g ").append(d).insertAfter(this.buttonGet(c).parent());if(a!==null){this.buttonAwesome(b,a)}},_addBBCodeButton:function(b){var c="__wcf_"+b.name;var a=this.buttonAdd(c,b.label,this._insertBBCode);this._bbcodes[c]=b.name;if(b.icon.match(/^fa\-[a-z\-]+$/)){this.buttonAwesome(c,b.icon)}else{a.css("background-image","url("+__REDACTOR_ICON_PATH+b.icon+")")}},_insertBBCode:function(a,g,c,f){var e=this._bbcodes[a];var b={buttonName:a,buttonDOM:g,buttonObj:c,event:f,cancel:false};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","insertBBCode_"+e+"_"+this.$source.wcfIdentify(),b);if(b.cancel===false){var d=this.getSelectionHtml();if(e==="tt"){var h=(this.getParent())?$(this.getParent()):null;if(h&&h.closest("inline.inlineCode",this.$editor.get()[0]).length){this.inlineRemoveClass("inlineCode")}else{this.inlineSetClass("inlineCode")}}else{this.insertHtml("["+e+"]"+d+"[/"+e+"]")}}f.preventDefault();return false}};
// wfontcolor.js
if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontcolor={init:function(){var a=this._createFontColorDropdown();this.buttonReplace("fontcolor","fontcolor",this.opts.curLang.fontcolor,$.proxy(function(f,c,b,d){this.dropdownShow(d,f)},this));this.buttonGet("fontcolor").data("dropdown",a)},_createFontColorDropdown:function(){var d=$(' |