note 126674 added to domdocument.loadhtml

From: Date: Fri, 10 Dec 2021 09:58:01 +0000
Subject: note 126674 added to domdocument.loadhtml
Groups: php.notes 
Request: Send a blank email to php-notes+get-217351@lists.php.net to get a copy of this message
To support HTML5 you have to disable xml error handling by add LIBXML_NOERROR as an option of loadHTML method. Example: <?php $doc = new DOMDocument(); $doc->loadHTML("<html><body>Test<br><section>I'M UNSUPPORTED</section></body></html>", LIBXML_NOERROR); echo $doc->saveHTML(); ?> ---- Server IP: 45.112.84.4 Probable Submitter: 45.112.85.242 (proxied: 8.30.234.36) ---- Manual Page -- https://php.net/manual/en/domdocument.loadhtml.php Edit -- https://main.php.net/note/edit/126674 Del: integrated -- https://main.php.net/note/delete/126674/integrated Del: useless -- https://main.php.net/note/delete/126674/useless Del: bad code -- https://main.php.net/note/delete/126674/bad+code Del: spam -- https://main.php.net/note/delete/126674/spam Del: non-english -- https://main.php.net/note/delete/126674/non-english Del: in docs -- https://main.php.net/note/delete/126674/in+docs Del: other reasons-- https://main.php.net/note/delete/126674 Reject -- https://main.php.net/note/reject/126674 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#217351) next »