JFilterInput
JFilterInput is a class for filtering input from any data source
Forked from the php input filter library by: Daniel Morris <dan@rootcube.com> Original Contributors: Gianpaolo Racca, Ghislain Picard, Marco Wandschneider, Chris Tobin and Andrew Eddie.
Located in /joomla/filter/filterinput.php (line 28)
JObject (Subpackage Base)
![]()
JFilterInput (Subpackage Filter)
static object The
&getInstance
([array $tagsArray = array()], [array $attrArray = array()], [int $tagsMethod = 0], [int $attrMethod = 0], [int $xssAuto = 1])
JFilterInput
__construct
([array $tagsArray = array()], [array $attrArray = array()], [int $tagsMethod = 0], [int $attrMethod = 0], [int $xssAuto = 1])
mixed
$attrArray
(line 31)
mixed
$attrBlacklist
= array ('action', 'background', 'codebase', 'dynsrc', 'lowsrc') (line 38)
mixed
$attrMethod
(line 34)
mixed
$tagBlacklist
= array ('applet', 'body', 'bgsound', 'base', 'basefont', 'embed', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'object', 'script', 'style', 'title', 'xml') (line 37)
mixed
$tagsArray
(line 30)
mixed
$tagsMethod
(line 33)
mixed
$xssAuto
(line 36)
Inherited Variables
Inherited from JObject
JObject::$_errors
Constructor for inputFilter class. Only first parameter is required.
- array $tagsArray: list of user-defined tags
- array $attrArray: list of user-defined attributes
- int $tagsMethod: WhiteList method = 0, BlackList method = 1
- int $attrMethod: WhiteList method = 0, BlackList method = 1
- int $xssAuto: Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1
- JObject::__construct()
- Class constructor, overridden in descendant classes.
Function to determine if contents of an attribute is safe
- array $attrSubSet: A 2 element array for attributes name,value
Method to be called by another php script. Processes for XSS and specified bad code.
- mixed $source: Input string/array-of-string to be 'cleaned'
- string $type: Return type for the variable (INT, FLOAT, BOOLEAN, WORD, ALNUM, CMD, BASE64, STRING, ARRAY, PATH, NONE)
Returns a reference to an input filter object, only creating it if it doesn't already exist.
This method must be invoked as:
$filter = & JFilterInput::getInstance();
- array $tagsArray: list of user-defined tags
- array $attrArray: list of user-defined attributes
- int $tagsMethod: WhiteList method = 0, BlackList method = 1
- int $attrMethod: WhiteList method = 0, BlackList method = 1
- int $xssAuto: Only auto clean essentials = 0, Allow clean blacklisted tags/attr = 1
Internal method to strip a tag of certain attributes
- array $attrSet: Array of attribute pairs to filter
Internal method to strip a string of certain tags
- string $source: Input string to be 'cleaned'
Internal method to iteratively remove all unwanted tags and attributes
- string $source: Input string to be 'cleaned'
Inherited Methods
Inherited From JObject
JObject::JObject()
JObject::__construct()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::getPublicProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()




