1--TEST-- 2DOM\HTMLDocument serialization escape text 03 - special tags in namespace should encode content 3--EXTENSIONS-- 4dom 5--FILE-- 6<?php 7 8$dom = DOM\HTMLDocument::createEmpty(); 9$body = $dom->appendChild($dom->createElement("body")); 10foreach (["style", "script", "xmp", "iframe", "noembed", "noframes", "plaintext", "noscript"] as $tag) { 11 $tag = $body->appendChild($dom->createElementNS("some:ns", $tag)); 12 $tag->textContent = "&\"<>\xc2\xa0 foobar"; 13 $body->append("\n"); 14} 15echo $dom->saveHTML(); 16 17?> 18--EXPECT-- 19<body><style>&"<> foobar</style> 20<script>&"<> foobar</script> 21<xmp>&"<> foobar</xmp> 22<iframe>&"<> foobar</iframe> 23<noembed>&"<> foobar</noembed> 24<noframes>&"<> foobar</noframes> 25<plaintext>&"<> foobar</plaintext> 26<noscript>&"<> foobar</noscript> 27</body> 28