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

Get E_WARNING when tags are broken #55

Open
webdreamsCH opened this issue Dec 11, 2022 · 1 comment
Open

Get E_WARNING when tags are broken #55

webdreamsCH opened this issue Dec 11, 2022 · 1 comment

Comments

@webdreamsCH
Copy link

The use of DOMDocument in my project generated a warning when using
$success = $dom->loadHtml(''.$xml, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
to load the Htmlstring and the Html-String was faulty. e.g. missing closing tags.

How can I get this warning via HTML5DomDocument ?

@ivopetkov
Copy link
Owner

ivopetkov commented Dec 11, 2022

Inside the HTML5DOMDocument::loadHTML() there is libxml_use_internal_errors(true) and I think this is the reason you don't get a warning, but $success should be false.

Could you please test this?

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