Source for file FormFilters.php
Documentation is available at FormFilters.php
# require_once 'XML/SaxFilters.php'; // This is the normal way to do it
# Done to help development
if ( !@include_once 'XML/SaxFilters.php' ) {
define ('XML_SAXFILTERS', '../../../');
include_once XML_SAXFILTERS . 'SaxFilters.php';
require_once(XML_SAXFILTERS. 'SaxFilters/FilterBuilder.php');
require_once(XML_SAXFILTERS. 'SaxFilters/IO/StringWriter.php');
// require PEAR::Validate
require_once('Validate.php');
function open($name,$attribs) {
if ( isset ( $this->child ) )
$this->child->open ($name,$attribs);
$this->child->setWriter ($this->writer);
$this->child->open ($name,$attribs);
if ( isset ( $this->child ) )
$this->child->close ($name);
if ( isset ($this->child) )
$this->child->data ($data);
foreach ( $attribs as $key => $value ) {
$openTag .= ' '. $key.= '"'. $value. '"';
function open($name,$attribs) {
if ( isset ( $this->child ) )
$this->child->open ($name,$attribs);
$this->child->setWriter ($this->writer);
$this->child->open ($name,$attribs);
} else if ( !$this->openened && $name == 'A' ) {
if ( isset ($attribs['href']) && Validate ::url ($attribs['href']) ) {
$tag = '<a href="'. $attribs['href']. ' target="_blank">';
if ( isset ( $this->child ) ) {
$this->child->close ($name);
} else if ( $name == 'A' ) {
$this->parent->unsetChild ();
if ( isset ($this->child) )
$this->child->data ($data);
function open($name,$attribs) {
if ( isset ( $this->child ) )
$this->child->open ($name,$attribs);
$this->child->setWriter ($this->writer);
$this->child->open ($name,$attribs);
} else if ( !$this->opened && ($name == 'B' || $name == 'STRONG') ) {
$this->writer->write ('<strong>');
if ( isset ( $this->child ) ) {
$this->child->close ($name);
} else if ( $name == 'B' || $name == 'STRONG' ) {
$this->writer->write ('</strong>');
$this->parent->unsetChild ();
if ( isset ($this->child) )
$this->child->data ($data);
function open($name,$attribs) {
if ( isset ( $this->child ) )
$this->child->open ($name,$attribs);
$this->child->setWriter ($this->writer);
$this->child->open ($name,$attribs);
} else if ( !$this->opened && ( $name == 'I' || $name == 'EM' ) ) {
if ( isset ( $this->child ) ) {
$this->child->close ($name);
} else if ( $name == 'I' || $name == 'EM' ) {
$this->writer->write ('</em>');
$this->parent->unsetChild ();
if ( isset ($this->child) )
$this->child->data ($data);
function open($name,$attribs) {
if ( !$this->opened && $name == 'CODE' ) {
$this->writer->write ('<code>');
$this->writer->write ('</code>');
$this->parent->unsetChild ();
function open($name,$attribs) {
if ( isset ( $this->child ) )
$this->child->open ($name,$attribs);
$this->child->setWriter ($this->writer);
$this->child->open ($name,$attribs);
} else if ( !$this->popened && $name == 'P' ) {
} else if ( !$this->bopened && $name == 'BLOCKQUOTE' ) {
$this->writer->write ('<blockquote>');
if ( isset ( $this->child ) ) {
$this->child->close ($name);
} else if ( $name == 'P' ) {
$this->parent->unsetChild ();
} else if ( $name == 'BLOCKQUOTE' ) {
$this->writer->write ('</blockquote>');
$this->parent->unsetChild ();
if ( isset ($this->child) )
$this->child->data ($data);
function open($name,$attribs) {
$this->writer->write ('<br />');
$this->parent->unsetChild ();
function open($name,$attribs) {
if ( isset ( $this->child ) )
$this->child->open ($name,$attribs);
$this->child->setWriter ($this->writer);
$this->child->open ($name,$attribs);
else if ( !$this->uopened && $name == 'UL' )
else if ( !$this->oopened && $name == 'OL' )
if ( isset ( $this->child ) ) {
$this->child->close ($name);
} else if ( $name == 'UL' ) {
$this->writer->write ('</ul>');
$this->parent->unsetChild ();
} else if ( $name == 'OL' ) {
$this->writer->write ('</ol>');
$this->parent->unsetChild ();
if ( isset ($this->child) )
$this->child->data ($data);
function open($name,$attribs) {
if ( isset ( $this->child ) )
$this->child->open ($name,$attribs);
$this->child->setWriter ($this->writer);
$this->child->open ($name,$attribs);
} else if ( !$this->opened && $name == 'LI' ) {
if ( isset ( $this->child ) ) {
$this->child->close ($name);
} else if ( $name == 'LI' ) {
$this->writer->write ('</li>');
$this->parent->unsetChild ();
if ( isset ($this->child) )
$this->child->data ($data);
$parser->parserSetOption ('XML_OPTION_CASE_FOLDING',1 );
$reader = & $writer->getReader ();
while ( ($slice = $reader->read ()) !== false ) {
Documentation generated on Mon, 11 Mar 2019 10:15:10 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|