Welcome! » Log In » Create A New Profile

Impresively simple implementation

Posted by toma42 
Impresively simple implementation
January 09, 2011 05:30AM

I knew I needed a filter and found yours to be at the top. I installed it then modified my ancestor Zend_Form class to filter all data before returning it via getValues();

This little snippet protects my whole application:

class MyApp_Form extends Zend_Form
     * Purify all form values
    public function getValues($suppressArrayNotation = false) 
        $values = parent::getValues($suppressArrayNotation);

        require_once 'HTMLPurifier/HTMLPurifier.auto.php';
        $hp = new HTMLPurifier();
        $values = $hp->purifyArray($values);

        return $values;

Thanks for making such a quality, uncomplicated, necessary, and elegantly executed library.

Tom Anderson


Sorry, you do not have permission to post/reply in this forum.