1--TEST--
2<template> element nesting
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$html = <<<HTML
9<!DOCTYPE html>
10<html>
11    <body>
12        <template>foo<template>bar</template></template>
13    </body>
14</html>
15HTML;
16$dom = Dom\HTMLDocument::createFromString($html);
17$template = $dom->body->firstElementChild;
18var_dump($template->innerHTML);
19echo $dom->saveXML();
20
21?>
22--EXPECT--
23string(27) "foo<template>bar</template>"
24<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
25<!DOCTYPE html>
26<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>
27        <template>foo<template>bar</template></template>
28
29</body></html>
30