[ Index ] |
|
Code source de SPIP Agora 1.4 |
1 <?php 2 /* 3 4 Example for Safehtml 5 6 */ 7 8 require_once ('../classes/safehtml.php'); 9 10 $doc 11 = ' 12 <a href="test"' . "\x08" . 'onmouseover="alert(1)">12</a>8 <br /> 13 <a href="test"' . "\x09" . 'onmouseover="alert(1)">12</a>9 <br /> 14 <a href="test"' . "\x0A" . 'onmouseover="alert(1)">12</a>a <br /> 15 <a href="test"' . "\x0B" . 'onmouseover="alert(1)">12</a>b <br /> 16 <a href="test"' . "\x0C" . 'onmouseover="alert(1)">12</a>c <br /> 17 <a href="test"' . "\x0D" . 'onmouseover="alert(1)">12</a>d <br /> 18 <a href="test"' . "\x20" . 'onmouseover="alert(1)">12</a>20 <br /> 19 <a href="test"' . "\x00" . 'onmouseover="alert(1)">12</a>0 <br /> 20 '; 21 22 // Instantiate the handler 23 $safehtml = &new safehtml(); 24 25 $result = $safehtml->parse($doc); 26 27 echo ('<b>Source code before filtration:</b><br/>'); 28 echo (htmlspecialchars($doc)); 29 30 echo ('<p><b>Code before filtration as is (HTML):</b><br/>'); 31 echo ($doc); 32 33 echo ('<p><b>Source code after filtration:</b><br/>'); 34 echo (htmlspecialchars($result)); 35 36 echo ('<p><b>Code after filtration as is (HTML):</b><br/>'); 37 echo ($result); 38 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 14:40:03 2007 | par Balluche grâce à PHPXref 0.7 |