mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-09 23:28:42 +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
|
<?php
|
||||||
|
|
||||||
foreach ($xml->attack as $attack) {
|
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>
|
<tr>
|
||||||
<td><?php echo htmlspecialchars($attack->name); ?></td>
|
<td><?php echo htmlspecialchars($attack->name); ?></td>
|
||||||
<td><textarea readonly="readonly" cols="20" rows="2"><?php echo htmlspecialchars($attack->code); ?></textarea></td>
|
<td><textarea readonly="readonly" cols="20" rows="2"><?php echo htmlspecialchars($code); ?></textarea></td>
|
||||||
<?php $pure_html = $purifier->purify($attack->code); ?>
|
<?php $pure_html = $purifier->purify($code); ?>
|
||||||
<td><textarea readonly="readonly" cols="20" rows="2"><?php echo htmlspecialchars($pure_html); ?></textarea></td>
|
<td><textarea readonly="readonly" cols="20" rows="2"><?php echo htmlspecialchars($pure_html); ?></textarea></td>
|
||||||
<td><?php echo $pure_html ?></td>
|
<td><?php echo $pure_html ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
Loading…
Reference in New Issue
Block a user