1--TEST--
2Dom\HTMLDocument serialization of CData
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8// Note: can't create CData in an HTML document.
9$dom = Dom\XMLDocument::createEmpty();
10$cdata = $dom->createCDATASection("foobaré\"<>-&");
11
12$dom = Dom\HTMLDocument::createEmpty();
13$container = $dom->appendChild($dom->createElement("container"));
14$container->appendChild($dom->importNode($cdata));
15echo $dom->saveHtml();
16
17?>
18--EXPECT--
19<container>foobaré"&lt;&gt;-&amp;</container>
20