1--TEST--
2Dom\HTMLDocument serialization escape text 02 - special tags in html namespace
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->createElement($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>&amp;"&lt;&gt;&nbsp; foobar</noscript>
27</body>
28