Permalink
Browse files

Update node.js

fix parseHTML 为script节点复制属性的BUG
  • Loading branch information...
1 parent 38173de commit e6e3ffbe0d696be62f6a29782c05f57f27e1bcee @RubyLouvre committed Aug 3, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 node.js
View
@@ -339,7 +339,7 @@ define("node", ["support", "class", "data"]
neo = script.cloneNode(false); //FF不能省略参数
for (var j = 0, attr; attr = el.attributes[j++]; ) {
if (attr.specified) { //复制其属性
- neo[attr.name] = [attr.value];
+ neo[attr.name] = attr.value;
}
}
neo.text = el.text; //必须指定,因为无法在attributes中遍历出来

0 comments on commit e6e3ffb

Please sign in to comment.