DOMDocument::saveHtml() generates element without name
Open
php5 incompatibility
php7 incompatibility
probably easy
- Dominant language
- C++
- Stars
- 18.7k
- Forks
- 3.1k
- Avg merge
- 1h 47m
- Merged PRs (30d)
- 2
Description
If `DOMDocument::saveHtml()` is called with an instance of `DOMDocumentFragment` as the argument it generates an invalid element node without a tag name for the fragment node.
### HHVM Version
hhvm-3.9.1 - 3.12.0
### Standalone code, or other way to reproduce the problem
``` php
$document = new DOMDocument();
$fragment = $document->createDocumentFragment();
$fragment->appendChild($document->createElement('em', 'test'));
$fragment->appendChild($document->createTextNode('test'));
echo $document->saveHtml($fragment);
```
### Expected result
``` html
testtest
```
### Actual result
``` html
<>testtest
```
Contributor guide
Assessment
This issue has not been assessed yet.