1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/dom/tests/modern/html/serializer/HTMLDocument_escape_attribute.phpt
2024-05-09 10:40:53 +02:00

16 lines
374 B
PHP

--TEST--
Dom\HTMLDocument serialization escape attribute
--EXTENSIONS--
dom
--FILE--
<?php
$dom = Dom\HTMLDocument::createFromString("<p></p>", LIBXML_NOERROR);
$p = $dom->documentElement->firstChild->nextSibling->firstChild;
$p->setAttribute("foo", "<bar>\"'&");
echo $dom->saveHtml();
?>
--EXPECT--
<html><head></head><body><p foo="<bar>&quot;'&amp;"></p></body></html>