Prepended constants with C_ to avoid reserved words as per https://www.php.net/manual...
[htmlpurifier/darkodev.git] / smoketests / dataScheme.php
blob7c0bbdc36b5bc91ffcdf86d7e2f5ec3ee208b359
1 <?php
3 require_once 'common.php';
5 echo '<?xml version="1.0" encoding="UTF-8" ?>';
6 ?><!DOCTYPE html
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">
10 <head>
11 <title>HTML Purifier data Scheme Smoketest</title>
12 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
13 </head>
14 <body>
15 <h1>HTML Purifier data Scheme Smoketest</h1>
16 <?php
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'));
29 <div><?php
30 echo $purifier->purify($string);
31 ?></div>
33 </body>
34 </html>
35 <?php
37 // vim: et sw=4 sts=4