Revision 306537666166 () - Diff

Link to this snippet: https://friendpaste.com/2jrhQQ0OzJosv243FDwyGe
Embed:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
test if the ' and " entities are not converted
--SKIPIF--
if (!extension_loaded('dom')) {
die('skip DOM extension not loaded.');
}
--FILE--
// create document (keep it simple)
$domImp = new DomImplementation();
$dom = $domImp->createDocument(null, 'root');

// create element with the entities
$foo = $dom->createElement('foo', '' "'); // bug here
$dom->documentElement->appendChild($foo);

echo $dom->saveXML();
--EXPECT--
<?xml version="1.0"?>
<root><foo>&apos; &quot;</foo></root>