1--TEST--
2Dom\HTMLDocument serialization escape nbsp
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = Dom\HTMLDocument::createFromString("<p>these must transform: \xc2\xa0\xc2\xa0 but these not: \xa0|\xc2...</p><br>", LIBXML_NOERROR);
9echo $dom->saveHtml();
10
11?>
12--EXPECT--
13<html><head></head><body><p>these must transform: &nbsp;&nbsp; but these not: �|�...</p><br></body></html>
14