}
    ?>
>
        <td><?php 
    echo escapeHTML($attack->name);
    ?>
</td>
        <td><pre><?php 
    echo formatCode($code);
    ?>
</pre></td>
        <?php 
    $pure_html = $purifier->purify($code);
    ?>
        <td><pre><?php 
    echo formatCode($pure_html);
    ?>
</pre></td>
        <td><div class="scroll"><?php 
    echo $pure_html;
    ?>
</div></td>
    </tr>
<?php 
}
?>
</tbody>
</table>
</body>
</html>
<?php 
Example #2
0
$filename = $_GET['file'];
$sourceText = file_get_contents($filename);
$text = $sourceText;
//$text = preg_replace("#(\\\x[0-9A-Fa-f]{2})#e", "chr(hexdec('\\1'))", $text);
for ($i = 255; $i >= 32; $i--) {
    $text = str_replace('\\x' . (string) dechex($i), chr($i), $text);
    $text = str_replace('\\' . (string) decoct($i), chr($i), $text);
}
?>

<style>
	#src {
		float: left;
		width: 50%;
		/*padding: 20px;*/
	}
	#dest {
		float: right;
		width: 50%;
		/*padding: 20px;*/
	}
</style>
<div id="src"><?php 
echo formatCode($sourceText);
?>
</div>
<div id="dest"><?php 
echo formatCode($text);
?>
</div>