Closed
Description
Description
I just ran the php-src test suite against the libxml2 master branch from which the 2.14.0 release will be cut soon. This resulted in a few errors in HTML tests. All these errors are expected after making libxml2's HTML parser more HTML5-conformant.
Several non-standard warnings were removed:
================================================================================
/home/nik/src/php-src/ext/dom/tests/DOMDocument_loadHTMLfile_variation1.phpt
================================================================================
================================================================================
001- %r(PHP ){0,1}%rWarning: DOMDocument::loadHTMLFile(): Document is empty %s
001+
================================================================================
================================================================================
/home/nik/src/php-src/ext/dom/tests/bug78025.phpt
================================================================================
string(0) ""
================================================================================
001- Warning: DOMDocument::loadHTML(): htmlParseDocTypeDecl : no DOCTYPE name ! in Entity, line: 1 in %s on line %d
string(0) ""
================================================================================
NUL bytes are handled properly:
================================================================================
/home/nik/src/php-src/ext/dom/tests/bug69679.phpt
================================================================================
<!DOCTYPE html>
<html><head><meta charset="UTF-8"></head><body>U+0000 <span>�</span></body></html>
================================================================================
<!DOCTYPE html>
002- <html><head><meta charset="UTF-8"></head><body>U+0000 <span></span></body></html>
002+ <html><head><meta charset="UTF-8"></head><body>U+0000 <span>�</span></body></html>
================================================================================
================================================================================
/home/nik/src/php-src/ext/dom/tests/bug80268_2.phpt
================================================================================
bool(false)
bool(false)
================================================================================
001- Warning: DOMDocument::loadHTML(): Char 0x0 out of allowed range in Entity, line: 1 in %s on line %d
bool(false)
003-
004- Warning: DOMDocument::loadHTMLFile(): Char 0x0 out of allowed range in %s on line %d
bool(false)
================================================================================
Creation of non-standard "implied" <p>
tags was removed:
================================================================================
/home/nik/src/php-src/ext/dom/tests/gh16535.phpt
================================================================================
Hierarchy Request Error
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body>oU</body></html>
================================================================================
Hierarchy Request Error
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
004- <html><body><p>oU</p></body></html>
004+ <html><body>oU</body></html>
================================================================================
The tokenizer now conforms to HTML5:
================================================================================
/home/nik/src/php-src/ext/simplexml/tests/bug51615.phpt
================================================================================
object(SimpleXMLElement)#4 (3) {
["@attributes"]=>
array(2) {
["title"]=>
string(0) ""
["y""]=>
string(0) ""
}
[0]=>
string(1) "x"
[1]=>
string(1) "x"
}
string(0) ""
string(0) ""
================================================================================
001- Warning: DOMDocument::loadHTML(): error parsing attribute name in Entity, line: 1 in %s on line %d
002-
003- Warning: DOMDocument::loadHTML(): error parsing attribute name in Entity, line: 1 in %s on line %d
object(SimpleXMLElement)#4 (3) {
["@attributes"]=>
array(2) {
["title"]=>
string(0) ""
009- ["y"]=>
006+ ["y""]=>
string(0) ""
}
[0]=>
--
================================================================================
PHP Version
8.5.0-dev
Operating System
No response