//>>built
define("dijit/_editor/html",["dojo/_base/array","dojo/_base/lang","dojo/sniff"],function(r,t,p){var e={};t.setObject("dijit._editor.html",e);var q=e.escapeXml=function(a,b){a=a.replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;");b||(a=a.replace(/'/gm,"\x26#39;"));return a};e.getNodeHtml=function(a){var b=[];e.getNodeHtmlHelper(a,b);return b.join("")};e.getNodeHtmlHelper=function(a,b){switch(a.nodeType){case 1:var f=a.nodeName.toLowerCase();if(!f||
"/"==f.charAt(0))return"";b.push("\x3c",f);var k=[],g={},c;if(p("dom-attributes-explicit")||p("dom-attributes-specified-flag"))for(var u=0;c=a.attributes[u++];){var l=c.name;"_dj"===l.substr(0,3)||p("dom-attributes-specified-flag")&&!c.specified||l in g||(c=c.value,("src"==l||"href"==l)&&a.getAttribute("_djrealurl")&&(c=a.getAttribute("_djrealurl")),8===p("ie")&&"style"===l&&(c=c.replace("HEIGHT:","height:").replace("WIDTH:","width:")),k.push([l,c]),g[l]=c)}else{var m=(/^input$|^img$/i.test(a.nodeName)?
a:a.cloneNode(!1)).outerHTML;g=m.match(/[\w-]+=("[^"]*"|'[^']*'|\S*)/gi);m=m.substr(0,m.indexOf("\x3e"));r.forEach(g,function(d){if(d){var h=d.indexOf("\x3d");if(0<h&&(d=d.substring(0,h),"_dj"!=d.substr(0,3)))if("src"!=d&&"href"!=d||!a.getAttribute("_djrealurl")){switch(d){case "style":var n=a.style.cssText.toLowerCase();break;case "class":n=a.className;break;case "width":if("img"===f){(h=/width=(\S+)/i.exec(m))&&(n=h[1]);break}case "height":if("img"===f){(h=/height=(\S+)/i.exec(m))&&(n=h[1]);break}default:n=
a.getAttribute(d)}null!=n&&k.push([d,n.toString()])}else k.push([d,a.getAttribute("_djrealurl")])}},this)}k.sort(function(d,h){return d[0]<h[0]?-1:d[0]==h[0]?0:1});for(g=0;c=k[g++];)b.push(" ",c[0],'\x3d"',"string"===typeof c[1]?q(c[1],!0):c[1],'"');switch(f){case "br":case "hr":case "img":case "input":case "base":case "meta":case "area":case "basefont":b.push(" /\x3e");break;case "script":b.push("\x3e",a.innerHTML,"\x3c/",f,"\x3e");break;default:b.push("\x3e"),a.hasChildNodes()&&e.getChildrenHtmlHelper(a,
b),b.push("\x3c/",f,"\x3e")}break;case 4:case 3:b.push(q(a.nodeValue,!0));break;case 8:b.push("\x3c!--",q(a.nodeValue,!0),"--\x3e");break;default:b.push("\x3c!-- Element not recognized - Type: ",a.nodeType," Name: ",a.nodeName,"--\x3e")}};e.getChildrenHtml=function(a){var b=[];e.getChildrenHtmlHelper(a,b);return b.join("")};e.getChildrenHtmlHelper=function(a,b){if(a)for(var f=a.childNodes||a,k=!p("ie")||f!==a,g,c=0;g=f[c++];)k&&g.parentNode!=a||e.getNodeHtmlHelper(g,b)};return e});