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

CDATA sections shoudn't be parsed #19

Closed
sonnyp opened this issue Nov 26, 2012 · 5 comments
Closed

CDATA sections shoudn't be parsed #19

sonnyp opened this issue Nov 26, 2012 · 5 comments

Comments

@sonnyp
Copy link
Member

sonnyp commented Nov 26, 2012

No description provided.

@sonnyp
Copy link
Member Author

sonnyp commented Nov 3, 2015

closing this due to inactivity; also I don't remember what was my issue back then.

It could be that CDATA is allowed in XMPP and we're trying to parse them and fail lamentably

@sonnyp sonnyp closed this as completed Nov 3, 2015
swissmanu pushed a commit to swissmanu/ltx that referenced this issue Dec 28, 2015
@elazutkin-dynata
Copy link

elazutkin-dynata commented Oct 1, 2019

It is still a bug. Example:

<![CDATA[&nbsp;]]>

Something like that (my real case is much more complex) will fail with Illegal XML entity &nbsp;. The whole idea of `CDATA is that any characters between

<![CDATA[

and

]]>

are read verbatim without translating. Other XML parsers I use in my project work correctly.

Should I create a new ticket for that?

@sonnyp
Copy link
Member Author

sonnyp commented Oct 1, 2019

Should I create a new ticket for that?

Yes please. Would be great to have a simple reproducible test case with it.

I could not reproduce with

const ltx = require('ltx')

console.log(ltx.parse('<foo><![CDATA[&nbsp;]]></foo>'))

@elazutkin-dynata
Copy link

Thank you. I will do a repro and open a new ticket (if the bug is confirmed).

@elazutkin-dynata
Copy link

See #132 with minimal repro.

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

2 participants