Eagerod / html-cruncher

HTML parser
MIT License
0 stars 0 forks source link

CDATA items not property handled. #14

Open Eagerod opened 8 years ago

Eagerod commented 8 years ago

When parsing a page that has CDATA elements in it, the parser can raise.

SyntaxError: Invalid regular expression: /\<(?:\s)*(?:\\)?/(?:\s)*![CDATA[(?:\s)*\>/: Unterminated character class
    at new RegExp (native)
    at Function.HTMLElement.processTagFromBufferIntoElements (/Users/Ragnar/Development/xpath-repl/node_modules/html-cruncher/lib/html-element.js:170:24)
-----------------------
    at Function.HTMLElement.processBufferIntoElements (/Users/Ragnar/Development/xpath-repl/node_modules/html-cruncher/lib/html-element.js:100:21)
    at Function.HTMLElement._fromString (/Users/Ragnar/Development/xpath-repl/node_modules/html-cruncher/lib/html-element.js:74:23)
    at Function.HTMLElement.processTagFromBufferIntoElements (/Users/Ragnar/Development/xpath-repl/node_modules/html-cruncher/lib/html-element.js:195:48)
------------------------ (Repeated)