[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/filter/src/ -> InputFilter.php (summary)

Part of the Joomla Framework Filter Package

Copyright: Copyright (C) 2005 - 2021 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 1016 lines (28 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

InputFilter:: (25 methods):
  __construct()
  clean()
  checkAttribute()
  remove()
  cleanTags()
  cleanAttributes()
  decode()
  escapeAttributeValues()
  stripCssExpressions()
  cleanInt()
  cleanInteger()
  cleanUint()
  cleanFloat()
  cleanDouble()
  cleanBool()
  cleanBoolean()
  cleanWord()
  cleanAlnum()
  cleanCmd()
  cleanBase64()
  cleanString()
  cleanHtml()
  cleanPath()
  cleanTrim()
  cleanUsername()


Class: InputFilter  - X-Ref

InputFilter is a class for filtering input from any data source

Forked from the php input filter library by: Daniel Morris <[email protected]>
Original Contributors: Gianpaolo Racca, Ghislain Picard, Marco Wandschneider, Chris Tobin and Andrew Eddie.

__construct(array $tagsArray = [], array $attrArray = [], $tagsMethod = self::ONLY_ALLOW_DEFINED_TAGS,$attrMethod = self::ONLY_ALLOW_DEFINED_ATTRIBUTES, $xssAuto = 1)   X-Ref
Constructor for InputFilter class.

param: array    $tagsArray   List of permitted HTML tags
param: array    $attrArray   List of permitted HTML tag attributes
param: integer  $tagsMethod  Method for filtering tags, should be one of the `ONLY_*_DEFINED_TAGS` constants
param: integer  $attrMethod  Method for filtering attributes, should be one of the `ONLY_*_DEFINED_ATTRIBUTES` constants
param: integer  $xssAuto     Only auto clean essentials = 0, Allow clean blocked tags/attributes = 1

clean($source, $type = 'string')   X-Ref
Cleans the given input source based on the instance configuration and specified data type

param: string|string[]|object  $source  Input string/array-of-string/object to be 'cleaned'
param: string                  $type    The return type for the variable:
return: mixed  'Cleaned' version of the `$source` parameter

checkAttribute($attrSubSet)   X-Ref
Function to determine if contents of an attribute are safe

param: array  $attrSubSet  A 2 element array for attribute's name, value
return: boolean  True if bad code is detected

remove($source)   X-Ref
Internal method to iteratively remove all unwanted tags and attributes

param: string  $source  Input string to be 'cleaned'
return: string  'Cleaned' version of input parameter

cleanTags($source)   X-Ref
Internal method to strip a string of disallowed tags

param: string  $source  Input string to be 'cleaned'
return: string  'Cleaned' version of input parameter

cleanAttributes(array $attrSet)   X-Ref
Internal method to strip a tag of disallowed attributes

param: array  $attrSet  Array of attribute pairs to filter
return: array  Filtered array of attribute pairs

decode($source)   X-Ref
Try to convert to plaintext

param: string  $source  The source string.
return: string  Plaintext string

escapeAttributeValues($source)   X-Ref
Escape < > and " inside attribute values

param: string  $source  The source string.
return: string  Filtered string

stripCssExpressions($source)   X-Ref
Remove CSS Expressions in the form of <property>:expression(...)

param: string  $source  The source string.
return: string  Filtered string

cleanInt($source)   X-Ref
Integer filter

param: string  $source  The string to be filtered
return: integer  The filtered value

cleanInteger($source)   X-Ref
Alias for cleanInt()

param: string  $source  The string to be filtered
return: integer  The filtered value

cleanUint($source)   X-Ref
Unsigned integer filter

param: string  $source  The string to be filtered
return: integer  The filtered value

cleanFloat($source)   X-Ref
Float filter

param: string  $source  The string to be filtered
return: float  The filtered value

cleanDouble($source)   X-Ref
Alias for cleanFloat()

param: string  $source  The string to be filtered
return: float  The filtered value

cleanBool($source)   X-Ref
Boolean filter

param: string  $source  The string to be filtered
return: boolean  The filtered value

cleanBoolean($source)   X-Ref
Alias for cleanBool()

param: string  $source  The string to be filtered
return: boolean  The filtered value

cleanWord($source)   X-Ref
Word filter

param: string  $source  The string to be filtered
return: string  The filtered string

cleanAlnum($source)   X-Ref
Alphanumerical filter

param: string  $source  The string to be filtered
return: string  The filtered string

cleanCmd($source)   X-Ref
Command filter

param: string  $source  The string to be filtered
return: string  The filtered string

cleanBase64($source)   X-Ref
Base64 filter

param: string  $source  The string to be filtered
return: string  The filtered string

cleanString($source)   X-Ref
String filter

param: string  $source  The string to be filtered
return: string  The filtered string

cleanHtml($source)   X-Ref
HTML filter

param: string  $source  The string to be filtered
return: string  The filtered string

cleanPath($source)   X-Ref
Path filter

param: string  $source  The string to be filtered
return: string  The filtered string

cleanTrim($source)   X-Ref
Trim filter

param: string  $source  The string to be filtered
return: string  The filtered string

cleanUsername($source)   X-Ref
Username filter

param: string  $source  The string to be filtered
return: string  The filtered string



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer