roojs-core.js
authorEdward <edward@roojs.com>
Tue, 8 Jul 2014 06:00:16 +0000 (14:00 +0800)
committerEdward <edward@roojs.com>
Tue, 8 Jul 2014 06:00:16 +0000 (14:00 +0800)
roojs-core-debug.js
roojs-ui.js
roojs-ui-debug.js
roojs-all.js
roojs-debug.js

roojs-all.js
roojs-debug.js
roojs-ui-debug.js
roojs-ui.js

index c750b34..8745546 100644 (file)
@@ -899,7 +899,7 @@ F=true;}if(!D.length&&E.length){D=E;}if(F||!D.length||(D.length>1)){return false
 A.collapse(true);C.collapse(true);var ss=A.compareBoundaryPoints(Range.START_TO_START,C);var ee=A.compareBoundaryPoints(Range.END_TO_END,C);var D=ss==1;var E=ee==-1;if(D&&E)return 0;if(!D&&E)return 1;if(D&&!E)return 2;return 3;},cleanUpPaste:function(){Roo.log('cleanuppaste');if(!this.clearUp){return;}
 this.cleanUpChildren(this.doc.body);var A=this.cleanWordChars(this.doc.body.innerHTML);if(A!=this.doc.body.innerHTML){this.doc.body.innerHTML=A;}},cleanWordChars:function(A){var he=Roo.HtmlEditorCore;var B=A;Roo.each(he.swapCodes,function(sw){var C=new RegExp("\\u"+sw[0].toString(16),"g");B=B.replace(C,sw[1]);});return B;},cleanUpChildren:function(n){if(!n.childNodes.length){return;}for(var i=n.childNodes.length-1;i>-1;i--){this.cleanUpChild(n.childNodes[i]);}},cleanUpChild:function(A){var ed=this;if(A.nodeName=="#text"){return;}if(A.nodeName=="#comment"){A.parentNode.removeChild(A);return;}if(Roo.HtmlEditorCore.black.indexOf(A.tagName.toLowerCase())>-1){A.parentNode.removeChild(A);return;}var B=Roo.HtmlEditorCore.remove.indexOf(A.tagName.toLowerCase())>-1;if(B){this.cleanUpChildren(A);while(A.childNodes.length){var cn=A.childNodes[0];A.removeChild(cn);A.parentNode.insertBefore(cn,A);}
 A.parentNode.removeChild(A);return;}if(!A.attributes||!A.attributes.length){this.cleanUpChildren(A);return;}function cleanAttr(n,v){if(v.match(/^\./)||v.match(/^\//)){return;}if(v.match(/^(http|https):\/\//)||v.match(/^mailto:/)){return;}if(v.match(/^#/)){return;}
-A.removeAttribute(n);}function cleanStyle(n,v){if(v.match(/expression/)){A.removeAttribute(n);return;}var C=typeof(ed.cwhite)=='undefined'?Roo.HtmlEditorCore.cwhite:ed.cwhite;var D=typeof(ed.cblack)=='undefined'?Roo.HtmlEditorCore.cblack:ed.cblack;var E=v.split(/;/);var F=[];Roo.each(E,function(p){p=p.replace(/^\s+/g,'').replace(/\s+$/g,'');if(!p.length){return true;}var l=p.split(':').shift().replace(/\s+/g,'');l=l.replace(/^\s+/g,'').replace(/\s+$/g,'');if(D.indexOf(l)>-1){return true;}if(C.length&&C.indexOf(l)<0){return true;}
+A.removeAttribute(n);}function cleanStyle(n,v){if(v.match(/expression/)){A.removeAttribute(n);return;}var C=typeof(ed.cwhite)=='undefined'?Roo.HtmlEditorCore.cwhite:ed.cwhite;var D=typeof(ed.cblack)=='undefined'?Roo.HtmlEditorCore.cblack:ed.cblack;var E=v.split(/;/);var F=[];Roo.each(E,function(p){p=p.replace(/^\s+/g,'').replace(/\s+$/g,'');if(!p.length){return true;}var l=p.split(':').shift().replace(/\s+/g,'');l=l.replace(/^\s+/g,'').replace(/\s+$/g,'');Roo.log('cleaning Style!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1');Roo.log(l);if(D.indexOf(l)>-1){return true;}if(C.length&&C.indexOf(l)<0){return true;}
 F.push(p);return true;});if(F.length){A.setAttribute(n,F.join(';'));}else {A.removeAttribute(n);}}for(var i=A.attributes.length-1;i>-1;i--){var a=A.attributes[i];if(a.name.toLowerCase().substr(0,2)=='on'){A.removeAttribute(a.name);continue;}if(Roo.HtmlEditorCore.ablack.indexOf(a.name.toLowerCase())>-1){A.removeAttribute(a.name);continue;}if(Roo.HtmlEditorCore.aclean.indexOf(a.name.toLowerCase())>-1){cleanAttr(a.name,a.value);continue;}if(a.name=='style'){cleanStyle(a.name,a.value);continue;}if(a.name=='class'){if(a.value.match(/^Mso/)){A.className='';}if(a.value.match(/body/)){A.className='';}continue;}}
 this.cleanUpChildren(A);}});Roo.HtmlEditorCore.white=['area','br','img','input','hr','wbr','address','blockquote','center','dd','dir','div','dl','dt','h1','h2','h3','h4','h5','h6','hr','isindex','listing','marquee','menu','multicol','ol','p','plaintext','pre','table','ul','xmp','caption','col','colgroup','tbody','td','tfoot','th','thead','tr','dir','menu','ol','ul','dl','embed','object'];Roo.HtmlEditorCore.black=['applet','base','basefont','bgsound','blink','body','frame','frameset','head','html','ilayer','iframe','layer','link','meta','object','script','style','title','xml'];Roo.HtmlEditorCore.clean=['script','style','title','xml'];Roo.HtmlEditorCore.remove=['font'];Roo.HtmlEditorCore.ablack=['on'];Roo.HtmlEditorCore.aclean=['action','background','codebase','dynsrc','href','lowsrc'];Roo.HtmlEditorCore.pwhite=['http','https','mailto'];Roo.HtmlEditorCore.cwhite=[];Roo.HtmlEditorCore.cblack=[];Roo.HtmlEditorCore.swapCodes=[[8211,"--"],[8212,"--"],[8216,"'"],[8217,"'"],[8220,'"'],[8221,'"'],[8226,"*"],[8230,"..."]];
 //Roo/form/HtmlEditor.js
index fdd5b1c..6d4c4d9 100644 (file)
@@ -41936,6 +41936,8 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
                 var l = p.split(':').shift().replace(/\s+/g,'');
                 l = l.replace(/^\s+/g,'').replace(/\s+$/g,'');
                 
+                Roo.log('cleaning Style!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1');
+                Roo.log(l);
                 
                 if ( cblack.indexOf(l) > -1) {
 //                    Roo.log('(REMOVE CSS)' + node.tagName +'.' + n + ':'+l + '=' + v);
index cd2b0a5..038b53e 100644 (file)
@@ -25618,6 +25618,8 @@ Roo.extend(Roo.HtmlEditorCore, Roo.Component,  {
                 var l = p.split(':').shift().replace(/\s+/g,'');
                 l = l.replace(/^\s+/g,'').replace(/\s+$/g,'');
                 
+                Roo.log('cleaning Style!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1');
+                Roo.log(l);
                 
                 if ( cblack.indexOf(l) > -1) {
 //                    Roo.log('(REMOVE CSS)' + node.tagName +'.' + n + ':'+l + '=' + v);
index 103aa06..a74b0a3 100644 (file)
@@ -565,7 +565,7 @@ F=true;}if(!D.length&&E.length){D=E;}if(F||!D.length||(D.length>1)){return false
 A.collapse(true);C.collapse(true);var ss=A.compareBoundaryPoints(Range.START_TO_START,C);var ee=A.compareBoundaryPoints(Range.END_TO_END,C);var D=ss==1;var E=ee==-1;if(D&&E)return 0;if(!D&&E)return 1;if(D&&!E)return 2;return 3;},cleanUpPaste:function(){Roo.log('cleanuppaste');if(!this.clearUp){return;}
 this.cleanUpChildren(this.doc.body);var A=this.cleanWordChars(this.doc.body.innerHTML);if(A!=this.doc.body.innerHTML){this.doc.body.innerHTML=A;}},cleanWordChars:function(A){var he=Roo.HtmlEditorCore;var B=A;Roo.each(he.swapCodes,function(sw){var C=new RegExp("\\u"+sw[0].toString(16),"g");B=B.replace(C,sw[1]);});return B;},cleanUpChildren:function(n){if(!n.childNodes.length){return;}for(var i=n.childNodes.length-1;i>-1;i--){this.cleanUpChild(n.childNodes[i]);}},cleanUpChild:function(A){var ed=this;if(A.nodeName=="#text"){return;}if(A.nodeName=="#comment"){A.parentNode.removeChild(A);return;}if(Roo.HtmlEditorCore.black.indexOf(A.tagName.toLowerCase())>-1){A.parentNode.removeChild(A);return;}var B=Roo.HtmlEditorCore.remove.indexOf(A.tagName.toLowerCase())>-1;if(B){this.cleanUpChildren(A);while(A.childNodes.length){var cn=A.childNodes[0];A.removeChild(cn);A.parentNode.insertBefore(cn,A);}
 A.parentNode.removeChild(A);return;}if(!A.attributes||!A.attributes.length){this.cleanUpChildren(A);return;}function cleanAttr(n,v){if(v.match(/^\./)||v.match(/^\//)){return;}if(v.match(/^(http|https):\/\//)||v.match(/^mailto:/)){return;}if(v.match(/^#/)){return;}
-A.removeAttribute(n);}function cleanStyle(n,v){if(v.match(/expression/)){A.removeAttribute(n);return;}var C=typeof(ed.cwhite)=='undefined'?Roo.HtmlEditorCore.cwhite:ed.cwhite;var D=typeof(ed.cblack)=='undefined'?Roo.HtmlEditorCore.cblack:ed.cblack;var E=v.split(/;/);var F=[];Roo.each(E,function(p){p=p.replace(/^\s+/g,'').replace(/\s+$/g,'');if(!p.length){return true;}var l=p.split(':').shift().replace(/\s+/g,'');l=l.replace(/^\s+/g,'').replace(/\s+$/g,'');if(D.indexOf(l)>-1){return true;}if(C.length&&C.indexOf(l)<0){return true;}
+A.removeAttribute(n);}function cleanStyle(n,v){if(v.match(/expression/)){A.removeAttribute(n);return;}var C=typeof(ed.cwhite)=='undefined'?Roo.HtmlEditorCore.cwhite:ed.cwhite;var D=typeof(ed.cblack)=='undefined'?Roo.HtmlEditorCore.cblack:ed.cblack;var E=v.split(/;/);var F=[];Roo.each(E,function(p){p=p.replace(/^\s+/g,'').replace(/\s+$/g,'');if(!p.length){return true;}var l=p.split(':').shift().replace(/\s+/g,'');l=l.replace(/^\s+/g,'').replace(/\s+$/g,'');Roo.log('cleaning Style!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!1');Roo.log(l);if(D.indexOf(l)>-1){return true;}if(C.length&&C.indexOf(l)<0){return true;}
 F.push(p);return true;});if(F.length){A.setAttribute(n,F.join(';'));}else {A.removeAttribute(n);}}for(var i=A.attributes.length-1;i>-1;i--){var a=A.attributes[i];if(a.name.toLowerCase().substr(0,2)=='on'){A.removeAttribute(a.name);continue;}if(Roo.HtmlEditorCore.ablack.indexOf(a.name.toLowerCase())>-1){A.removeAttribute(a.name);continue;}if(Roo.HtmlEditorCore.aclean.indexOf(a.name.toLowerCase())>-1){cleanAttr(a.name,a.value);continue;}if(a.name=='style'){cleanStyle(a.name,a.value);continue;}if(a.name=='class'){if(a.value.match(/^Mso/)){A.className='';}if(a.value.match(/body/)){A.className='';}continue;}}
 this.cleanUpChildren(A);}});Roo.HtmlEditorCore.white=['area','br','img','input','hr','wbr','address','blockquote','center','dd','dir','div','dl','dt','h1','h2','h3','h4','h5','h6','hr','isindex','listing','marquee','menu','multicol','ol','p','plaintext','pre','table','ul','xmp','caption','col','colgroup','tbody','td','tfoot','th','thead','tr','dir','menu','ol','ul','dl','embed','object'];Roo.HtmlEditorCore.black=['applet','base','basefont','bgsound','blink','body','frame','frameset','head','html','ilayer','iframe','layer','link','meta','object','script','style','title','xml'];Roo.HtmlEditorCore.clean=['script','style','title','xml'];Roo.HtmlEditorCore.remove=['font'];Roo.HtmlEditorCore.ablack=['on'];Roo.HtmlEditorCore.aclean=['action','background','codebase','dynsrc','href','lowsrc'];Roo.HtmlEditorCore.pwhite=['http','https','mailto'];Roo.HtmlEditorCore.cwhite=[];Roo.HtmlEditorCore.cblack=[];Roo.HtmlEditorCore.swapCodes=[[8211,"--"],[8212,"--"],[8216,"'"],[8217,"'"],[8220,'"'],[8221,'"'],[8226,"*"],[8230,"..."]];
 //Roo/form/HtmlEditor.js