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

Feature request: Ability to handle self-closing tags and CDATA in non-XML mode #73

Closed
patrick-steele-idem opened this issue Feb 6, 2014 · 0 comments

Comments

@patrick-steele-idem
Copy link
Contributor

For my use case I needed support for a hybrid parser that would allow for XML constructs to be recognized in HTML code. After looking at the source code I felt that adding more options could provide more fine-grained control over parsing without adding too much complexity to the code. Please review my Pull Request which added two new options:

  • recognizeSelfClosing: If set to true then self-closing tags will result in the tag being closed even if xmlMode is not set to true
  • recognizeCDATA: If set to true then CDATA text will result in the ontext event being fired even if xmlMode is not set to true

In theory, xmlMode could be used as a way to control the more fine-grained options, but I wanted to minimize code change.

patrick-steele-idem added a commit to patrick-steele-idem/htmlparser2 that referenced this issue Feb 6, 2014
@fb55 fb55 closed this as completed Mar 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants