Source for file index.php
Documentation is available at index.php
require_once('FormFilters.php');
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<title> Form Filter Example </title>
<h1>Form Filter Example</h1>
<p>This example demonstrates how PEAR::XML_SaxFilters <i>might</i> be used with PEAR::XML_HTMLSax to filter form posts which are allowed to contain a limited subset of HTML. Note that this example is not checking the HTML submitted for well formedness but rather limiting the allowed tags to a limited subset and preventing the use of attributes for XSS.</p>
Enter something below<br />
<form action=" <?php echo ($_SERVER['PHP_SELF']); ?>" method="post">
<textarea name="message" cols="40" rows="5"></textarea><br />
<input type="submit" name="submit" value=" Post "><br />
<li><a href="http://www.php.net">PHP</a></li>
<li><b />, <strong /> = <strong /></li>
<li><i />, <em /> = <em /></li>
<li><blockquote /></li>
<li><ul /> <ol />, <li /></li>
if ( isset ($_POST['submit']) ) {
<?php echo ( $filteredText ); ?>
Documentation generated on Mon, 11 Mar 2019 10:15:10 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|