3 require_once 'common.php';
5 echo '<?xml version="1.0" encoding="UTF-8" ?>';
7 PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
8 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
9 <html xmlns
="http://www.w3.org/1999/xhtml">
11 <title
>HTML Purifier data Scheme Smoketest
</title
>
12 <meta http
-equiv
="Content-Type" content
="text/html; charset=UTF-8" />
15 <h1
>HTML Purifier data Scheme Smoketest
</h1
>
18 $string = '<img src="data:image/png;base64,
19 iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABGdBTUEAALGP
20 C/xhBQAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9YGARc5KB0XV+IA
21 AAAddEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIFRoZSBHSU1Q72QlbgAAAF1J
22 REFUGNO9zL0NglAAxPEfdLTs4BZM4DIO4C7OwQg2JoQ9LE1exdlYvBBeZ7jq
23 ch9//q1uH4TLzw4d6+ErXMMcXuHWxId3KOETnnXXV6MJpcq2MLaI97CER3N0
24 vr4MkhoXe0rZigAAAABJRU5ErkJggg==" alt="Red dot" />';
26 $purifier = new HTMLPurifier(array('URI.AllowedSchemes' => 'data'));
30 echo $purifier->purify($string);