From:             gdec at prz-rzeszow dot pl
Operating system: Linux fpm-fcgi
PHP version:      5.4.8
Package:          DOM XML related
Bug Type:         Bug
Bug description:DOMDocument::loadHTML prints warning while loading well-formed 
xhtml

Description:
------------
Exact PHP version is 5.4.7.
In the sample code, the variable $html contains a valid xhtml document.
The method DOMDocument::loadHTML does not expect however the </br> closing
tag.

Test script:
---------------
$html=<<<EOD
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
    <head><title>test</title></head>
    <body><p> test<br></br>test</p></body>
</html>
EOD;
$dom = new DOMDocument();
$dom->loadHTML($html);

Expected result:
----------------
expected result: no warning should be printed.

Actual result:
--------------
<br />
<b>Warning</b>:  DOMDocument::loadHTML(): Unexpected end tag : br in
Entity, line: 5 in <b>[...][...]</b> on line <b>10</b><br />

-- 
Edit bug report at https://bugs.php.net/bug.php?id=63503&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63503&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63503&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=63503&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63503&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63503&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63503&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63503&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63503&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63503&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63503&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=63503&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=63503&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63503&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63503&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63503&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63503&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63503&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63503&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63503&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63503&r=mysqlcfg

Reply via email to