note 129769 added to domdocument.loadhtml

From: Date: Wed, 25 Sep 2024 05:36:24 +0000
Subject: note 129769 added to domdocument.loadhtml
Groups: php.notes 
Request: Send a blank email to php-notes+get-221552@lists.php.net to get a copy of this message
It is funny to read: "Warning: This function parses the input using an HTML 4 parser. The parsing rules of HTML 5, which is what modern web browsers use, are different. Depending on the input this might result in a different DOM structure. Therefore this function cannot be safely used for sanitizing HTML." Actually this is not using HTML 4 parser but libxml. So that means, even if you had a HTML 4 document, you will still get xml warnings. Yes, I know, PHP for more than 20 years, was not able, natively to parse a html document, let alone html 5. Things will change with php 8.4, let's hope. ---- Server IP: 45.112.84.4 Probable Submitter: 80.90.5.137 (proxied: 104.28.225.130) ---- Manual Page -- https://php.net/manual/en/domdocument.loadhtml.php Edit -- https://main.php.net/note/edit/129769 Del: integrated -- https://main.php.net/note/delete/129769/integrated Del: useless -- https://main.php.net/note/delete/129769/useless Del: bad code -- https://main.php.net/note/delete/129769/bad+code Del: spam -- https://main.php.net/note/delete/129769/spam Del: non-english -- https://main.php.net/note/delete/129769/non-english Del: in docs -- https://main.php.net/note/delete/129769/in+docs Del: other reasons-- https://main.php.net/note/delete/129769 Reject -- https://main.php.net/note/reject/129769 Search -- https://main.php.net/manage/user-notes.php

« previous php.notes (#221552) next »