Req #50973 [PATCH]: DOMDocument::saveHTML() should be able to take a node as an arg
| From: | gillcovid19@gmail.com | Date: | Mon, 17 May 2021 10:55:35 +0000 |
| Subject: | Req #50973 [PATCH]: DOMDocument::saveHTML() should be able to take a node as an arg | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-233858@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=50973&edit=1
ID: 50973
Patch added by: gillcovid19@gmail.com
Reported by: geoffers+phpbugs at gmail dot com
Summary: DOMDocument::saveHTML() should be able to take a
node as an arg
Status: Duplicate
Type: Feature/Change Request
Package: DOM XML related
Operating System: *
PHP Version: 5.*, 6
Assigned To: rrichards
Block user comment: N
Private report: N
New Comment:
The following pull request has been associated:
Patch Name: Add commit ID to build info
On GitHub: https://github.com/php/doc-base/pull/17
Patch: https://github.com/php/doc-base/pull/17.patch
Previous Comments:
------------------------------------------------------------------------
[2011-02-18 20:09:24] rrichards@php.net
dupe of bug #39771 which was already taken care of
------------------------------------------------------------------------
[2010-11-28 11:58:09] valid at example dot com
When this gets fixed, it should also fix http://bugs.php.net/bug.php?id=39771
------------------------------------------------------------------------
[2010-03-05 22:06:34] pajoye@php.net
Rob, what's your opinion on this patch?
------------------------------------------------------------------------
[2010-02-10 18:25:44] geoffers+phpbugs at gmail dot com
http://pastebin.ca/1792855 is a patch for this, based upon
saveXML(). There is one notable difference between what I have, based on that, and what is currently
there: the if (mem) within the if (!size) is not present within saveXML(), and nor as a result in my
patch. I presume that it should either be in both saveXML and saveHTML or neither: any idea?
And, of course, my prior comment was wrong: it's only saveXML() which has the argument, not
save().
------------------------------------------------------------------------
[2010-02-09 16:00:06] geoffers+phpbugs at gmail dot com
Description:
------------
At the moment DOMDocument::save() and DOMDocument::saveXML() both take an optional first argument
which is a node to serialize; DOMDocument::saveHTML() and DOMDocument::saveHTMLFile() have no such
option and always serialize the whole file. For cases where HTML serialization is needed of a
specific node, all that can be done is doing it within PHP code (which is comparatively very slow).
As libxml includes the needed APIs to do this, it doesn't appear to be overly complex to
implement. I'll try to write a patch for this later.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=50973&edit=1