Release 4.5.0
[htmlpurifier.git] / smoketests / cacheConfig.php
blob2d4ffdda37caf5a713450fa8414e5ccfbf3009d1
1 <?php
3 require_once 'common.php';
5 $config = HTMLPurifier_Config::createDefault();
6 $config->set('HTML.Doctype', 'HTML 4.01 Strict');
7 $config->set('HTML.Allowed', 'b,a[href],br');
8 $config->set('CSS.AllowTricky', true);
9 $config->set('URI.Disable', true);
10 $serial = $config->serialize();
12 $result = unserialize($serial);
13 $purifier = new HTMLPurifier($result);
14 echo htmlspecialchars($purifier->purify('<b>Bold</b><br><i><a href="http://google.com">no</a> formatting</i>'));