--TEST-- Test writing Element::$innerHTML on HTML documents --EXTENSIONS-- dom --FILE-- createElement('div'); $dom->appendChild($el); $el->innerHTML = '
foo
'; echo $dom->saveXML(), "\n"; $el->innerHTML = ''; echo $dom->saveXML(), "\n"; $el->innerHTML = ''; echo $dom->saveXML(), "\n"; $el->innerHTML = ' '; echo $dom->saveXML(), "\n"; $el->innerHTML = "invalid\xffutf-8๐๐๐"; echo $dom->saveXML(), "\n"; // Create a non-interned string that gets the UTF-8 validity flag added $str = str_repeat("my valid string", random_int(1, 1)); preg_match('/^.*$/u', $str); $el->innerHTML = $str; echo $dom->saveXML(), "\n"; $dom = DOM\HTMLDocument::createEmpty(); $el = $dom->createElement('style'); $dom->appendChild($el); $el->innerHTML = 'foo
'; echo $dom->saveXML(), "\n"; $dom = DOM\HTMLDocument::createEmpty(); $el = $dom->createElementNS('urn:a', 'style'); $dom->appendChild($el); $el->innerHTML = 'foo
'; echo $dom->saveXML(), "\n"; $dom = DOM\HTMLDocument::createEmpty(); $el = $dom->createElement('textarea'); $dom->appendChild($el); $el->innerHTML = "\0-->"; echo $dom->saveXML(), "\n"; ?> --EXPECT--foo