ID:               41339
 Updated by:       [EMAIL PROTECTED]
 Reported By:      rasch at raschnet dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         DOM XML related
 Operating System: Ubuntu Linux
 PHP Version:      5.2.2
 New Comment:

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

The parser provided by libXML is not an HTML tag validator, it only 
cares about the syntax of tags being valid.


Previous Comments:
------------------------------------------------------------------------

[2007-05-09 15:58:57] rasch at raschnet dot com

Description:
------------
In usage of symfony, our code was mistakenly producing a meta tag with
two content types.  However, from what I understand it's not invalid,
but either way PHP falls on this, the DOM parser should return an error.
 The current behavior is that PHP returns an empty string when calling
'$dom->saveHTML()' in the code sample below.



Reproduce code:
---------------
$dom = new DomDocument("1.0", "utf-8");                                
        
$val =$dom->loadHTML('                                                 
        
<html>                                                                 
        
<head>                                                                 
        
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8,
text/html; charset=utf-8">                                              
                 
</head>                                                                
        
<body>Hello</body></html>');                                           
        
var_dump($val);                                                        
        
print $dom->saveHTML();   
print "\n^^^ empty string\n";

Expected result:
----------------
<html>                                                                 
        
<head>                                                                 
        
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8,
text/html; charset=utf-8">                                              
                 
</head>                                                                
        
<body><p>Hello</p></body></html>

Actual result:
--------------
bool(true)

// ^^^ empty string


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41339&edit=1

Reply via email to