Bug #48509 [Asn]: formatOutput does not work with saveHTML

2010-03-06 Thread felipe
Edit report at http://bugs.php.net/bug.php?id=48509&edit=1

 ID:   48509
 Updated by:   fel...@php.net
 Reported by:  k...@php.net
 Summary:  formatOutput does not work with saveHTML
 Status:   Assigned
 Type: Bug
 Package:  DOM XML related
 Operating System: Mac OS X 10.5.7
 PHP Version:  5.3CVS-2009-06-09 (CVS)
 Assigned To:  rrichards

 New Comment:

I got 'This is the title' on
5_2, 5_3 and HEAD using saveHTML(), and using saveHTMLfile() I got:





This is the title




Previous Comments:

[2009-06-11 08:36:09] chr...@php.net

Rob: I applied the patch to 5_3, but it doesn't format with libxml 

2.7.3, do you know something, what's wrong here? Although, I didn't test


with 2.6.23.








[2009-06-10 06:49:31] chr...@php.net

RIght, that never was backported to the 5_3 branch. But we're currently


in a commit freeze, so I can't check it in, but will as soon as I am 

allowed to do it.



That's the patch by the way:



http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?

r1=1.78&r2=1.79&pathrev=MAIN&view=patch


[2009-06-09 16:51:53] k...@php.net

Description:

While writing test cases on Oslo TestFest 2009 I just found that the
$dom->formatOutput does not work with $dom->saveHTML() (even though it
seems to have been resolved here: http://bugs.php.net/bug.php?id=35673)



xmllint says:



$ xmllint --format --html output.html 

http://www.w3.org/TR/REC-html40/loose.dtd";>





This is the title





so according to Hannes here this seems to be a bug in PHP 5.3 (may be
that it's fixed i HEAD but not backported?).

Reproduce code:
---
formatOutput = true;

$root = $doc->createElement('html');

$root = $doc->appendChild($root);

$head = $doc->createElement('head');

$head = $root->appendChild($head);

$title = $doc->createElement('title');

$title = $head->appendChild($title);

$text = $doc->createTextNode('This is the title');

$text = $title->appendChild($text);

echo $doc->saveHTML();

?>

Expected result:



  

This is the title

  



Actual result:
--
This is the title






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


#48509 [Asn]: formatOutput does not work with saveHTML

2009-06-11 Thread chregu
 ID:   48509
 Updated by:   chr...@php.net
 Reported By:  k...@php.net
 Status:   Assigned
 Bug Type: DOM XML related
 Operating System: Mac OS X 10.5.7
 PHP Version:  5.3CVS-2009-06-09 (CVS)
-Assigned To:  chregu
+Assigned To:  rrichards
 New Comment:

Rob: I applied the patch to 5_3, but it doesn't format with libxml 
2.7.3, do you know something, what's wrong here? Although, I didn't
test 
with 2.6.23.





Previous Comments:


[2009-06-10 06:49:31] chr...@php.net

RIght, that never was backported to the 5_3 branch. But we're currently

in a commit freeze, so I can't check it in, but will as soon as I am 
allowed to do it.

That's the patch by the way:

http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?
r1=1.78&r2=1.79&pathrev=MAIN&view=patch



[2009-06-09 16:51:53] k...@php.net

Description:

While writing test cases on Oslo TestFest 2009 I just found that the
$dom->formatOutput does not work with $dom->saveHTML() (even though it
seems to have been resolved here: http://bugs.php.net/bug.php?id=35673)

xmllint says:

$ xmllint --format --html output.html 
http://www.w3.org/TR/REC-html40/loose.dtd";>


This is the title


so according to Hannes here this seems to be a bug in PHP 5.3 (may be
that it's fixed i HEAD but not backported?).

Reproduce code:
---
formatOutput = true;
$root = $doc->createElement('html');
$root = $doc->appendChild($root);
$head = $doc->createElement('head');
$head = $root->appendChild($head);
$title = $doc->createElement('title');
$title = $head->appendChild($title);
$text = $doc->createTextNode('This is the title');
$text = $title->appendChild($text);
echo $doc->saveHTML();
?>

Expected result:


  
This is the title
  


Actual result:
--
This is the title





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