xref: /PHP-7.2/ext/tidy/tests/024.phpt (revision 6319a358)
1--TEST--
2libtidy handling of 'new-blocklevel-tags'
3--SKIPIF--
4<?php
5if (!extension_loaded('tidy')) die('skip');
6if (strtotime(tidy_get_release()) < strtotime('20 january 2007')) die ('skip old libtidy');
7?>
8--FILE--
9<?php
10
11// more info at http://sf.net/tracker/?func=detail&atid=390963&aid=1598422&group_id=27659
12
13$contents = '
14<wps:block>
15<wps:var>
16<wps:value></wps:value>
17</wps:var>
18</wps:block>';
19
20$config = array(
21'doctype' => 'omit',
22'new-blocklevel-tags' => 'wps:block,wps:var,wps:value',
23'newline' => 'LF'
24);
25
26$tidy = tidy_parse_string($contents, $config, 'utf8');
27$tidy->cleanRepair();
28echo $tidy;
29
30?>
31--EXPECTF--
32<html>
33<head>
34<title></title>
35</head>
36<body>
37<wps:block>%w<wps:var>%w<wps:value></wps:value>%w</wps:var>%w</wps:block>
38</body>
39</html>
40