diff --git a/sax.js b/sax.js index f8b494e..2fad780 100644 --- a/sax.js +++ b/sax.js @@ -603,7 +603,7 @@ ElementAttributes.prototype = { function split(source,start){ var match; var buf = []; - var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g; + var reg = /'[^']+'|"[^"]+"|\[[^\]]+]|[^\s<>\/=]+=?|(\/?\s*>|<)/g; reg.lastIndex = start; reg.exec(source);//skip < while(match = reg.exec(source)){ diff --git a/test/parse/node.js b/test/parse/node.js index 7548818..855e889 100644 --- a/test/parse/node.js +++ b/test/parse/node.js @@ -98,7 +98,11 @@ wows.describe('XML Node Parse').addBatch({ var doc = parser.parseFromString('
', 'text/html'); console.log(doc+'') - } + }, + 'internal subset':function(){ + var doc = (new DOMParser()).parseFromString('bar"> ]>