[php-src] Issue #8813: LIBXML_NOWARNING flag ingnored on loadHTML*

From: Date: Fri, 17 Jun 2022 12:25:48 +0000
Subject: [php-src] Issue #8813: LIBXML_NOWARNING flag ingnored on loadHTML*
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-241753@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/8813 Author: sudo-plz ### Description The following code ([3v4l](https://3v4l.org/vZR37)): ```php $doc=new DOMDocument(); $doc->loadHTML("<tagthatthrowswarning>HI</tagthatthrowswarning>", LIBXML_NOWARNING); echo $doc->saveHTML(); ``` Resulted in this output: ``` Warning: DOMDocument::loadHTML(): Tag tagthatthrowswarning invalid in Entity, line: 1 in /in/vZR37 on line 4 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html><body><tagthatthrowswarning>HI</tagthatthrowswarning></body></html> ``` But I expected this output instead: ``` <no warnings> ``` Should've been fixed in https://bugs.php.net/bug.php?id=74004, however the same 3v4l link contains the same output for the newest versions. ### PHP Version PHP 8.1.7 ### Operating System Manjaro Linux

« previous php.bugs (#241753) next »