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>&amp;"&lt;&gt;&nbsp; foobar</style>
20<script>&amp;"&lt;&gt;&nbsp; foobar</script>
21<xmp>&amp;"&lt;&gt;&nbsp; foobar</xmp>
22<iframe>&amp;"&lt;&gt;&nbsp; foobar</iframe>
23<noembed>&amp;"&lt;&gt;&nbsp; foobar</noembed>
24<noframes>&amp;"&lt;&gt;&nbsp; foobar</noframes>
25<plaintext>&amp;"&lt;&gt;&nbsp; foobar</plaintext>
26<noscript>&amp;"&lt;&gt;&nbsp; foobar</noscript>
27</body>
28