php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #39771 DOMDocument->saveHTML does not accept an optional DOMNode like saveXML
Submitted: 2006-12-07 19:34 UTC Modified: 2011-01-18 20:45 UTC
From: dave dot lane at gmx dot net Assigned: cataphract
Status: Closed Package: *General Issues
PHP Version: 5.2.0 OS: Linux
Private report: No CVE-ID:
 [2006-12-07 19:34 UTC] dave dot lane at gmx dot net
Description:
------------
DOMDocument->saveHTML does not accept an optional DOMNode like DOMDocument->saveXML.

In saveXML this functionality is implemented using xmlNodeDump. libxml2 offers the html equivalent htmlNodeDump. 

Is there a good reason why this is not implemented?


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-01-18 20:45 UTC] cataphract@php.net
Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=307561
Log: - Implemented FR #39771 (Made DOMDocument::saveHTML accept an optional
  DOMNode like DOMDocument::saveXML).
 [2011-01-18 20:45 UTC] cataphract@php.net
-Status: Open +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: cataphract
 [2011-01-18 20:45 UTC] cataphract@php.net
Implemented for PHP 5.3 and trunk.
 [2011-01-18 20:56 UTC] cataphract@php.net
Automatic comment from SVN on behalf of cataphract
Revision: http://svn.php.net/viewvc/?view=revision&revision=307562
Log: - Fixed wrong function call in original commit to FR #39771.
 [2011-09-12 23:07 UTC] jbolter at gmail dot com
I am running PHP 5.3.6 but still get this error:

PHP Warning:  DOMDocument::saveHTML() expects exactly 0 parameters, 1 given

Any ideas?
 [2013-01-08 17:04 UTC] taswyn at gmail dot com
Note: when looking at the changelogs for this, the number of accepted arguments 
was never updated. This still only accepts one argument:
[revision 307562, both copies of dom/document.c]

158    ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savehtml, 0, 0, 0)
159    ZEND_END_ARG_INFO();
 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Sun Apr 20 13:01:59 2014 UTC