function GetHtmlImplementation(A){this.editor=A}GetHtmlImplementation._pluginInfo={name:"GetHtmlImplementation DOMwalk",origin:"Xinha Core",version:"$LastChangedRevision:961 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL:http://svn.xinha.webfactional.com/trunk/modules/GetHtml/DOMwalk.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};Xinha.getHTML=function(C,B,A){return Xinha.getHTMLWrapper(C,B,A)};Xinha.emptyAttributes=" checked disabled ismap readonly nowrap compact declare selected defer multiple noresize noshade ";Xinha.getHTMLWrapper=function(M,L,J,H){var G="";if(!H){H=""}switch(M.nodeType){case 10:case 6:case 12:break;case 2:break;case 4:G+=(Xinha.is_ie?("\n"+H):"")+"<![CDATA["+M.data+"]]>";break;case 5:G+="&"+M.nodeValue+";";break;case 7:G+=(Xinha.is_ie?("\n"+H):"")+"<?"+M.target+" "+M.data+" ?>";break;case 1:case 11:case 9:var O;var F;var N=(M.nodeType==1)?M.tagName.toLowerCase():"";if((N=="script"||N=="noscript")&&J.config.stripScripts){break}if(L){L=!(J.config.htmlRemoveTags&&J.config.htmlRemoveTags.test(N))}if(Xinha.is_ie&&N=="head"){if(L){G+=(Xinha.is_ie?("\n"+H):"")+"<head>"}var K=RegExp.multiline;RegExp.multiline=true;var I=M.innerHTML.replace(Xinha.RE_tagName,function(S,R,Q){return R+Q.toLowerCase()}).replace(/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g,'="$2$4$5"$3').replace(/<(link|meta)((\s*\S*="[^"]*")*)>/g,"<$1$2 />");RegExp.multiline=K;G+=I+"\n";if(L){G+=(Xinha.is_ie?("\n"+H):"")+"</head>"}break}else{if(L){O=(!(M.hasChildNodes()||Xinha.needsClosingTag(M)));G+=((Xinha.isBlockElement(M))?("\n"+H):"")+"<"+M.tagName.toLowerCase();var E=M.attributes;for(F=0;F<E.length;++F){var P=E.item(F);if(typeof P.nodeValue=="object"){continue}if(M.tagName.toLowerCase()=="input"&&M.type.toLowerCase()=="checkbox"&&P.nodeName.toLowerCase()=="value"&&P.nodeValue.toLowerCase()=="on"){continue}if(!P.specified&&!(M.tagName.toLowerCase().match(/input|option/)&&P.nodeName=="value")&&!(M.tagName.toLowerCase().match(/area/)&&P.nodeName.match(/shape|coords/i))){continue}var D=P.nodeName.toLowerCase();if(/_moz_editor_bogus_node/.test(D)||(D=="class"&&P.nodeValue=="webkit-block-placeholder")){G="";break}if(/(_moz)|(contenteditable)|(_msh)/.test(D)){continue}var C;if(Xinha.emptyAttributes.indexOf(" "+D+" ")!=-1){C=D}else{if(D!="style"){if(typeof M[P.nodeName]!="undefined"&&D!="href"&&D!="src"&&!(/^on/.test(D))){C=M[P.nodeName]}else{C=P.nodeValue;if(D=="class"){C=C.replace(/Apple-style-span/,"");if(!C){continue}}if(Xinha.is_ie&&(D=="href"||D=="src")){C=J.stripBaseURL(C)}if(J.config.only7BitPrintablesInURLs&&(D=="href"||D=="src")){C=C.replace(/([^!-~]+)/g,function(Q){return escape(Q)})}}}else{if(!Xinha.is_ie){C=M.style.cssText.replace(/rgb\(.*?\)/ig,function(Q){return Xinha._colorToRgb(Q)})}}}if(/^(_moz)?$/.test(C)){continue}G+=" "+D+'="'+Xinha.htmlEncode(C)+'"'}if(Xinha.is_ie&&M.style.cssText){G+=' style="'+M.style.cssText.toLowerCase()+'"'}if(Xinha.is_ie&&M.tagName.toLowerCase()=="option"&&M.selected){G+=' selected="selected"'}if(G!==""){if(O&&N=="p"){G+=">&nbsp;</p>"}else{if(O){G+=" />"}else{G+=">"}}}}}var B=false;if(N=="script"||N=="noscript"){if(!J.config.stripScripts){if(Xinha.is_ie){var A="\n"+M.innerHTML.replace(/^[\n\r]*/,"").replace(/\s+$/,"")+"\n"+H}else{var A=(M.hasChildNodes())?M.firstChild.nodeValue:""}G+=A+"</"+N+">"+((Xinha.is_ie)?"\n":"")}}else{if(N=="pre"){G+=((Xinha.is_ie)?"\n":"")+M.innerHTML.replace(/<br>/g,"\n")+"</"+N+">"}else{for(F=M.firstChild;F;F=F.nextSibling){if(!B&&F.nodeType==1&&Xinha.isBlockElement(F)){B=true}G+=Xinha.getHTMLWrapper(F,true,J,H+"  ")}if(L&&!O){G+=(((Xinha.isBlockElement(M)&&B)||N=="head"||N=="html")?("\n"+H):"")+"</"+M.tagName.toLowerCase()+">"}}}break;case 3:if(/^script|noscript|style$/i.test(M.parentNode.tagName)){G=M.data}else{if(M.data.trim()==""){if(M.data){G=" "}else{G=""}}else{G=Xinha.htmlEncode(M.data)}}break;case 8:G="<!--"+M.data+"-->";break}return G};