Index: openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/GetHtml/DOMwalk.js =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/GetHtml/DOMwalk.js,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/GetHtml/DOMwalk.js 13 May 2008 18:53:46 -0000 1.5 +++ openacs-4/packages/acs-templating/www/resources/xinha-nightly/modules/GetHtml/DOMwalk.js 16 Jan 2009 09:05:47 -0000 1.6 @@ -1,187 +1,2 @@ -/* This compressed file is part of Xinha. For uncompressed sources, forum, and bug reports, go to xinha.org */ -/* This file is part of version 0.95 released Mon, 12 May 2008 17:33:15 +0200 */ -/* The URL of the most recent version of this file is http://svn.xinha.webfactional.com/trunk/modules/GetHtml/DOMwalk.js */ -function GetHtmlImplementation(_1){ -this.editor=_1; -} -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(_2,_3,_4){ -return Xinha.getHTMLWrapper(_2,_3,_4); -}; -Xinha.emptyAttributes=" checked disabled ismap readonly nowrap compact declare selected defer multiple noresize noshade "; -Xinha.getHTMLWrapper=function(_5,_6,_7,_8){ -var _9=""; -if(!_8){ -_8=""; -} -switch(_5.nodeType){ -case 10: -case 6: -case 12: -break; -case 2: -break; -case 4: -_9+=(Xinha.is_ie?("\n"+_8):"")+""; -break; -case 5: -_9+="&"+_5.nodeValue+";"; -break; -case 7: -_9+=(Xinha.is_ie?("\n"+_8):"")+"<"+"?"+_5.target+" "+_5.data+" ?>"; -break; -case 1: -case 11: -case 9: -var _a; -var i; -var _c=(_5.nodeType==1)?_5.tagName.toLowerCase():""; -if((_c=="script"||_c=="noscript")&&_7.config.stripScripts){ -break; -} -if(_6){ -_6=!(_7.config.htmlRemoveTags&&_7.config.htmlRemoveTags.test(_c)); -} -if(Xinha.is_ie&&_c=="head"){ -if(_6){ -_9+=(Xinha.is_ie?("\n"+_8):"")+""; -} -var _d=RegExp.multiline; -RegExp.multiline=true; -var _e=_5.innerHTML.replace(Xinha.RE_tagName,function(_f,p1,p2){ -return p1+p2.toLowerCase(); -}).replace(/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g,"=\"$2$4$5\"$3").replace(/<(link|meta)((\s*\S*="[^"]*")*)>/g,"<$1$2 />"); -RegExp.multiline=_d; -_9+=_e+"\n"; -if(_6){ -_9+=(Xinha.is_ie?("\n"+_8):"")+""; -} -break; -}else{ -if(_6){ -_a=(!(_5.hasChildNodes()||Xinha.needsClosingTag(_5))); -_9+=((Xinha.isBlockElement(_5))?("\n"+_8):"")+"<"+_5.tagName.toLowerCase(); -var _12=_5.attributes; -for(i=0;i<_12.length;++i){ -var a=_12.item(i); -if(typeof a.nodeValue=="object"){ -continue; -} -if(_5.tagName.toLowerCase()=="input"&&_5.type.toLowerCase()=="checkbox"&&a.nodeName.toLowerCase()=="value"&&a.nodeValue.toLowerCase()=="on"){ -continue; -} -if(!a.specified&&!(_5.tagName.toLowerCase().match(/input|option/)&&a.nodeName=="value")&&!(_5.tagName.toLowerCase().match(/area/)&&a.nodeName.match(/shape|coords/i))){ -continue; -} -var _14=a.nodeName.toLowerCase(); -if(/_moz_editor_bogus_node/.test(_14)||(_14=="class"&&a.nodeValue=="webkit-block-placeholder")){ -_9=""; -break; -} -if(/(_moz)|(contenteditable)|(_msh)/.test(_14)){ -continue; -} -var _15; -if(Xinha.emptyAttributes.indexOf(" "+_14+" ")!=-1){ -_15=_14; -}else{ -if(_14!="style"){ -if(typeof _5[a.nodeName]!="undefined"&&_14!="href"&&_14!="src"&&!(/^on/.test(_14))){ -_15=_5[a.nodeName]; -}else{ -_15=a.nodeValue; -if(_14=="class"){ -_15=_15.replace(/Apple-style-span/,""); -if(!_15){ -continue; -} -} -if(Xinha.is_ie&&(_14=="href"||_14=="src")){ -_15=_7.stripBaseURL(_15); -} -if(_7.config.only7BitPrintablesInURLs&&(_14=="href"||_14=="src")){ -_15=_15.replace(/([^!-~]+)/g,function(_16){ -return escape(_16); -}); -} -} -}else{ -if(!Xinha.is_ie){ -_15=_5.style.cssText.replace(/rgb\(.*?\)/ig,function(rgb){ -return Xinha._colorToRgb(rgb); -}); -} -} -} -if(/^(_moz)?$/.test(_15)){ -continue; -} -_9+=" "+_14+"=\""+Xinha.htmlEncode(_15)+"\""; -} -if(Xinha.is_ie&&_5.style.cssText){ -_9+=" style=\""+_5.style.cssText.toLowerCase()+"\""; -} -if(Xinha.is_ie&&_5.tagName.toLowerCase()=="option"&&_5.selected){ -_9+=" selected=\"selected\""; -} -if(_9!==""){ -if(_a&&_c=="p"){ -_9+="> 

"; -}else{ -if(_a){ -_9+=" />"; -}else{ -_9+=">"; -} -} -} -} -} -var _18=false; -if(_c=="script"||_c=="noscript"){ -if(!_7.config.stripScripts){ -if(Xinha.is_ie){ -var _19="\n"+_5.innerHTML.replace(/^[\n\r]*/,"").replace(/\s+$/,"")+"\n"+_8; -}else{ -var _19=(_5.hasChildNodes())?_5.firstChild.nodeValue:""; -} -_9+=_19+""+((Xinha.is_ie)?"\n":""); -} -}else{ -if(_c=="pre"){ -_9+=((Xinha.is_ie)?"\n":"")+_5.innerHTML.replace(/
/g,"\n")+""; -}else{ -for(i=_5.firstChild;i;i=i.nextSibling){ -if(!_18&&i.nodeType==1&&Xinha.isBlockElement(i)){ -_18=true; -} -_9+=Xinha.getHTMLWrapper(i,true,_7,_8+" "); -} -if(_6&&!_a){ -_9+=(((Xinha.isBlockElement(_5)&&_18)||_c=="head"||_c=="html")?("\n"+_8):"")+""; -} -} -} -break; -case 3: -if(/^script|noscript|style$/i.test(_5.parentNode.tagName)){ -_9=_5.data; -}else{ -if(_5.data.trim()==""){ -if(_5.data){ -_9=" "; -}else{ -_9=""; -} -}else{ -_9=Xinha.htmlEncode(_5.data); -} -} -break; -case 8: -_9=""; -break; -} -return _9; -}; - +/* This compressed file is part of Xinha. For uncomressed sources, forum, and bug reports, go to xinha.org */ +function GetHtmlImplementation(a){this.editor=a}GetHtmlImplementation._pluginInfo={name:"GetHtmlImplementation DOMwalk",origin:"Xinha Core",version:"$LastChangedRevision: 1084 $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),developer:"The Xinha Core Developer Team",developer_url:"$HeadURL: http://svn.xinha.org/trunk/modules/GetHtml/DOMwalk.js $".replace(/^[^:]*:\s*(.*)\s*\$$/,"$1"),sponsor:"",sponsor_url:"",license:"htmlArea"};Xinha.getHTML=function(a,c,b){return Xinha.getHTMLWrapper(a,c,b)};Xinha.emptyAttributes=" checked disabled ismap readonly nowrap compact declare selected defer multiple noresize noshade ";Xinha.getHTMLWrapper=function(m,c,j,d){var h="";if(!d){d=""}switch(m.nodeType){case 10:case 6:case 12:break;case 2:break;case 4:h+=(Xinha.is_ie?("\n"+d):"")+"";break;case 5:h+="&"+m.nodeValue+";";break;case 7:h+=(Xinha.is_ie?("\n"+d):"")+"";break;case 1:case 11:case 9:var k;var g;var p=(m.nodeType==1)?m.tagName.toLowerCase():"";if((p=="script"||p=="noscript")&&j.config.stripScripts){break}if(c){c=!(j.config.htmlRemoveTags&&j.config.htmlRemoveTags.test(p))}if(Xinha.is_ie&&p=="head"){if(c){h+=(Xinha.is_ie?("\n"+d):"")+""}var r=RegExp.multiline;RegExp.multiline=true;var f=m.innerHTML.replace(Xinha.RE_tagName,function(s,i,a){return i+a.toLowerCase()}).replace(/\s*=\s*(([^'"][^>\s]*)([>\s])|"([^"]+)"|'([^']+)')/g,'="$2$4$5"$3').replace(/<(link|meta)((\s*\S*="[^"]*")*)>/g,"<$1$2 />");RegExp.multiline=r;h+=f+"\n";if(c){h+=(Xinha.is_ie?("\n"+d):"")+""}break}else{if(c){k=(!(m.hasChildNodes()||Xinha.needsClosingTag(m)));h+=((Xinha.isBlockElement(m))?("\n"+d):"")+"<"+m.tagName.toLowerCase();var q=m.attributes;for(g=0;g 

"}else{if(k){h+=" />"}else{h+=">"}}}}}var e=false;if(p=="script"||p=="noscript"){if(!j.config.stripScripts){if(Xinha.is_ie){var l="\n"+m.innerHTML.replace(/^[\n\r]*/,"").replace(/\s+$/,"")+"\n"+d}else{var l=(m.hasChildNodes())?m.firstChild.nodeValue:""}h+=l+""+((Xinha.is_ie)?"\n":"")}}else{if(p=="pre"){h+=((Xinha.is_ie)?"\n":"")+m.innerHTML.replace(/
/g,"\n")+""}else{for(g=m.firstChild;g;g=g.nextSibling){if(!e&&g.nodeType==1&&Xinha.isBlockElement(g)){e=true}h+=Xinha.getHTMLWrapper(g,true,j,d+" ")}if(c&&!k){h+=(((Xinha.isBlockElement(m)&&e)||p=="head"||p=="html")?("\n"+d):"")+""}}}break;case 3:if(/^script|noscript|style$/i.test(m.parentNode.tagName)){h=m.data}else{if(m.data.trim()==""){if(m.data){h=" "}else{h=""}}else{h=Xinha.htmlEncode(m.data)}}break;case 8:h="";break}return h}; \ No newline at end of file