--TEST-- Attribute entity expansion --EXTENSIONS-- dom --FILE-- createElement('elt'); $doc->appendChild($elt); $elt->setAttribute('a','&'); print $doc->saveHtml($elt) . "\n"; $attr = $elt->getAttributeNode('a'); $attr->value = '&'; print "$attr->value\n"; print $doc->saveHtml($elt) . "\n"; $attr->removeChild($attr->firstChild); print $doc->saveHtml($elt) . "\n"; $attr->nodeValue = '&'; print "$attr->nodeValue\n"; print $doc->saveHtml($elt) . "\n"; $attr->nodeValue = '&'; print "$attr->nodeValue\n"; print $doc->saveHtml($elt) . "\n"; $elt->removeAttributeNode($attr); $elt->setAttributeNS('http://www.w3.org/2000/svg', 'svg:id','&'); print $doc->saveHtml($elt) . "\n"; $attr = $elt->getAttributeNodeNS('http://www.w3.org/2000/svg', 'id'); $attr->value = '<&'; print "$attr->value\n"; print $doc->saveHtml($elt) . "\n"; ?> --EXPECT-- & & & <&