1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-15 14:55:56 +00:00

Revert "remove htmlpurifier"

This reverts commit c21a462d52.
This commit is contained in:
Andrew Dolgov
2012-06-05 21:52:21 +04:00
parent 705b97b7fc
commit 010efc9b81
356 changed files with 26185 additions and 4 deletions

View File

@@ -0,0 +1,32 @@
<?php
/**
* Property list iterator. Do not instantiate this class directly.
*/
class HTMLPurifier_PropertyListIterator extends FilterIterator
{
protected $l;
protected $filter;
/**
* @param $data Array of data to iterate over
* @param $filter Optional prefix to only allow values of
*/
public function __construct(Iterator $iterator, $filter = null) {
parent::__construct($iterator);
$this->l = strlen($filter);
$this->filter = $filter;
}
public function accept() {
$key = $this->getInnerIterator()->key();
if( strncmp($key, $this->filter, $this->l) !== 0 ) {
return false;
}
return true;
}
}
// vim: et sw=4 sts=4