mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-23 00:41:52 +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:
parent
5690c9e0a2
commit
52c598730e
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user