diff --git a/_test/core/filternode.js b/_test/core/filternode.js
new file mode 100644
index 0000000000000000000000000000000000000000..6a23642f1735a303f8de6f4011b0765b92f6cdaa
--- /dev/null
+++ b/_test/core/filternode.js
@@ -0,0 +1,33 @@
+module( 'core.filternode' );
+
+test( '', function() {
+ var uNode = UE.uNode;
+ var node = uNode.createElement('
');
+ UE.filterNode(node,{
+ 'p':{},
+ 'b':'-'
+ });
+ equals(node.toHtml().replace(/[ ]+>/g,'>'),'');
+ node.innerHTML('sdfasdf
');
+ UE.filterNode(node,{
+ 'p':{$:{
+ style:['color']
+ }},
+ 'td':{}
+ });
+ equals(node.toHtml().replace(/[ ]+>/g,'>'),'');
+ node.innerHTML('sdfasdf
');
+ UE.filterNode(node,{
+ 'p':{$:{
+ style:['color']
+ }},
+ 'tr':function(node){
+ node.tagName = 'p';
+ node.setAttr();
+ },
+ 'td':function(node){
+ node.parentNode.removeChild(node,true)
+ }
+ });
+ equals(node.toHtml().replace(/[ ]+>/g,'>'),'');
+});
\ No newline at end of file
diff --git a/_test/core/node.js b/_test/core/node.js
index 58ead1572c99ab049d19a686a002524c18a2f6f2..2690c427ea38093b93c53b7fa61b0744ccbc83b4 100644
--- a/_test/core/node.js
+++ b/_test/core/node.js
@@ -1,4 +1,4 @@
-module( 'core.htmlparser' );
+module( 'core.node' );
test( '', function() {
var uNode = UE.uNode;
@@ -61,6 +61,16 @@ test( '', function() {
'border':'',
'color':''
});
+ equals(node.getAttr('style'),undefined);
+ node.setStyle('border','');
- equals(node.getAttr('style'),undefined)
+ equals(node.getAttr('style'),"border:<script>alert("")</script>;");
+
+ equals(node.toHtml(),'')
+ node.innerHTML('asdfasdfsdf
')
+ node.removeChild(node.firstChild(),true);
+ equals(node.toHtml(),'asdfasdfsdf
')
+ var tmp = new UE.uNode.createElement('div');
+ node.appendChild(tmp);
+ equals(tmp.getIndex(),2)
});
\ No newline at end of file
diff --git a/_test/core/utils.js b/_test/core/utils.js
index 1f37335ffe0fe4589eaee4fe3f53298ac2646429..8a3073a62aa81986e01692f0a2d5bffb3b4dee40 100644
--- a/_test/core/utils.js
+++ b/_test/core/utils.js
@@ -235,6 +235,8 @@ test('unhtml 字符转义', function(){
var str='"as&cd"
';
var str_html=utils.unhtml(str);
equal(str_html,'<p>"as&cd"</p>','转义字符成功');
+ str = 'border:<script>alert("")</script>"'
+ equal(utils.unhtml(str),'border:<script>alert("")</script>"','转义字符成功');
});
test('html 反转义', function(){
var utils=te.obj[0];