diff --git a/_src/core/node.js b/_src/core/node.js index 8a50f30edac6109cd7c41ce573127090ab260b83..280218c275e9e07b544a070e99503a23ee9ea536 100644 --- a/_src/core/node.js +++ b/_src/core/node.js @@ -87,7 +87,7 @@ attrhtml = attrhtml.join(' '); } arr.push('<' + node.tagName + - (attrhtml ? ' ' + attrhtml + ' ' : '') + + (attrhtml ? ' ' + attrhtml : '') + (dtd.$empty[node.tagName] ? '\/' : '' ) + '>' ); //插入新行 @@ -398,7 +398,7 @@ }, setStyle:function (name, val) { function exec(name, val) { - var reg = new RegExp(name + ':([^;]+);?', 'gi'); + var reg = new RegExp(name + ':([^;]+;?)', 'gi'); cssStyle = cssStyle.replace(reg, ''); if (val) { cssStyle = name + ':' + utils.unhtml(val) + ';' + cssStyle