(function(b){var a=b.cleditor.defaultOptions.updateTextArea;b.cleditor.defaultOptions.updateTextArea=function(c){if(a){c=a(c)}return b.cleditor.convertHTMLtoXHTML(c)};b.cleditor.convertHTMLtoXHTML=function(n){var r=/^<(\w+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,k=/^<\/(\w+)[^>]*>/,q=/(\w+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;var m=o("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed");var j=o("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul");var f=o("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");var e=o("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");var c=o("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");var d=o("script,style");var g=[];g.last=function(){return this[this.length-1]};var h,i,l=n,p="";while(n){if(!g.last()||!d[g.last()]){if(n.indexOf("<!--")==0){h=n.indexOf("-->");if(h>=0){p+=n.substring(0,h+3);n=n.substring(h+3)}}else{if(n.indexOf("</")==0){i=n.match(k);if(i){n=n.substring(i[0].length);i[0].replace(k,s)}}else{if(n.indexOf("<")==0){i=n.match(r);if(i){n=n.substring(i[0].length);i[0].replace(r,t)}}else{h=n.indexOf("<");p+=(h<0?n:n.substring(0,h));n=h<0?"":n.substring(h)}}}}else{n=n.replace(new RegExp("(.*)</"+g.last()+"[^>]*>"),function(v,w){w=w.replace(/<!--(.*?)-->/g,"$1").replace(/<!\[CDATA\[(.*?)]]>/g,"$1");p+=w;return""});s("",g.last())}if(n==l){throw"Parse Error: "+n}l=n}s();u(/<b>(.*?)<\/b>/g,"<strong>$1</strong>");u(/<i>(.*?)<\/i>/g,"<em>$1</em>");return p;function o(y){var x={},v=y.split(",");for(var w=0;w<v.length;w++){x[v[w]]=true}return x}function t(v,z,A,w){z=z.toLowerCase();if(j[z]){while(g.last()&&f[g.last()]){s("",g.last())}}if(e[z]&&g.last()==z){s("",z)}w=m[z]||!!w;if(!w){g.push(z)}var x=[];A.replace(q,function(C,B){var D=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:c[B]?B:"";x.push({name:B,escaped:D.replace(/(^|[^\\])"/g,'$1\\"')})});p+="<"+z;for(var y=0;y<x.length;y++){p+=" "+x[y].name+'="'+x[y].escaped+'"'}p+=(w?"/":"")+">"}function s(v,x){if(!x){var y=0}else{x=x.toLowerCase();for(var y=g.length-1;y>=0;y--){if(g[y]==x){break}}}if(y>=0){for(var w=g.length-1;w>=y;w--){p+="</"+g[w]+">"}g.length=y}}function u(w,v){p=p.replace(w,v)}}})(jQuery);