DesignLiquido / xslt-processor

A JavaScript XSLT processor without native library dependencies
GNU Lesser General Public License v3.0
95 stars 30 forks source link

Parsing CDATA - wrong index incrementation #13

Closed mari6274 closed 5 years ago

mari6274 commented 5 years ago

https://github.com/fiduswriter/xslt-processor/blob/36f2af419a559f9f1a1074cb9bd1db39393513d2/src/dom.js#L127

Hi,

Thanks for your lib. I'm using it in my xslt-action VS Code plugin. One of the users requested an issue. Parsing CDATA tags seems to work wrong. In cited line index i is incremented by 12 (correct) but for loop increment it once more and parsing continues in second char after CDATA tag instead of the first one. The same problem probably occurs with comments.

I think increment values should be 6 for comments and 11 for CDATA tags.

johanneswilm commented 5 years ago

@mari6274 Could you cite the line where it is increasing more and explain what should happen instead (preferably with a patch)?

johanneswilm commented 5 years ago

fixed