Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stricter LtxParser #110

Open
sonnyp opened this issue Feb 24, 2017 · 1 comment
Open

stricter LtxParser #110

sonnyp opened this issue Feb 24, 2017 · 1 comment

Comments

@sonnyp
Copy link
Member

sonnyp commented Feb 24, 2017

ltx.parse('<o/>f')
ltx.parse('<o></o>f<b/>')
ltx.parse('<o>f</b>')

should fail, currently extra data is ignored

@sonnyp sonnyp changed the title parse doesn't fail for the following test case parse doesn't fail for the following test cases Mar 4, 2017
@sonnyp sonnyp changed the title parse doesn't fail for the following test cases stricter parser Mar 4, 2017
@sonnyp sonnyp changed the title stricter parser stricter LtxParser Mar 4, 2017
@sonnyp
Copy link
Member Author

sonnyp commented Aug 21, 2021

xmpp.js does something like this

https://github.com/xmppjs/xmpp.js/blob/main/packages/xml/lib/Parser.js

Not sure how much ltx should enforce strict xml or what should happen on invalid xml. Perhaps it's best to leave to the users to decide?

In which case this should be documented eventually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant