0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-09-19 10:45:18 +00:00

Urldecode the US-ASCII test.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@267 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2006-08-15 22:03:04 +00:00
parent 5690c9e0a2
commit 52c598730e

View File

@ -31,11 +31,14 @@ $purifier = new HTMLPurifier();
<?php
foreach ($xml->attack as $attack) {
$code = $attack->code;
// custom code for US-ASCII, which couldn't be expressed in XML without encoding
if ($attack->name == 'US-ASCII encoding') $code = urldecode($code);
?>
<tr>
<td><?php echo htmlspecialchars($attack->name); ?></td>
<td><textarea readonly="readonly" cols="20" rows="2"><?php echo htmlspecialchars($attack->code); ?></textarea></td>
<?php $pure_html = $purifier->purify($attack->code); ?>
<td><textarea readonly="readonly" cols="20" rows="2"><?php echo htmlspecialchars($code); ?></textarea></td>
<?php $pure_html = $purifier->purify($code); ?>
<td><textarea readonly="readonly" cols="20" rows="2"><?php echo htmlspecialchars($pure_html); ?></textarea></td>
<td><?php echo $pure_html ?></td>
</tr>