NaturalIntelligence / fast-xml-parser

Validate XML, Parse XML and Build XML rapidly without C/C++ based libraries and no callback.
https://naturalintelligence.github.io/fast-xml-parser/
MIT License
2.49k stars 302 forks source link

Fix '<' or '>' in DTD comment throwing an error. #533

Closed Cwazywierdo closed 1 year ago

Cwazywierdo commented 1 year ago

Purpose / Goal

This PR fixes a bug where if a comment in the doctype definition contains '<' or '>' it throws an error. The XML specification allows '<' and '>' in comments, and does not note an exception excluding them in the DTD.

Closes #530

Benchmarks

Before

fxp v3 : 47776.15215500227 requests/second
fxp : 30512.79096797974 requests/second
fxp - preserve order : 33437.923151138326 requests/second
xmlbuilder2 : 10620.38965853095 requests/second
xml2js  : 8749.365823529228 requests/second

After

fxp v3 : 47832.232365539996 requests/second
fxp : 30937.34839987414 requests/second
fxp - preserve order : 33804.982961890804 requests/second
xmlbuilder2 : 10637.245964526057 requests/second
xml2js  : 8782.803299604513 requests/second

Type

Please mention the type of PR

Note : Please ensure that you've read contribution guidelines before raising this PR. If your PR is in progress, please prepend [WIP] in PR title. Your PR will be reviewed when [WIP] will be removed from the PR title.

Bookmark this repository for further updates.

coveralls commented 1 year ago

Coverage Status

Coverage: 98.511% (+0.04%) from 98.467% when pulling 58bd746d4de84f05dd236d69c4df68cff36c56f5 on Cwazywierdo:doctype-comment-angle-bracket into 007d6386969e2212ccab80a5c4385c1dbcba2876 on NaturalIntelligence:master.

coveralls commented 1 year ago

Coverage Status

Coverage: 98.511% (+0.04%) from 98.467% when pulling 58bd746d4de84f05dd236d69c4df68cff36c56f5 on Cwazywierdo:doctype-comment-angle-bracket into 007d6386969e2212ccab80a5c4385c1dbcba2876 on NaturalIntelligence:master.

amitguptagwl commented 1 year ago

I would be checking this PR soon.

amitguptagwl commented 1 year ago

can you please merge your change to dev branch?

Cwazywierdo commented 1 year ago

Did it, I think.