\HTMLPurifier_Injector_SafeObject
Adds important param elements to inside of object in order to make things safe.
Synopsis
class HTMLPurifier_Injector_SafeObject
extends HTMLPurifier_Injector
{
- // members
- public string $name = 'SafeObject';
- public array $needed = ;
- protected array $objectStack = ;
- protected array $paramStack = ;
- protected array $addParam = ;
- protected array $allowedParam = ;
- // Inherited members from HTMLPurifier_Injector
- public $name;
- protected $htmlDefinition;
- protected $currentNesting;
- protected $inputTokens;
- protected $inputIndex;
- public array $needed;
- protected boolean $rewind;
- // methods
- public void prepare()
- public void handleElement()
- public void handleEnd()
- // Inherited methods from HTMLPurifier_Injector
- public void rewind()
- public void getRewind()
- public Boolean prepare()
- public Boolean checkNeeded()
- public True allowsElement()
- protected void forward()
- protected void forwardUntilEndToken()
- protected void backward()
- protected void current()
- public void handleText()
- public void handleElement()
- public void handleEnd()
- public void notifyEnd()
Hierarchy
Extends
Members
protected
- $addParam
- $allowedParam
-
$currentNesting
Reference to CurrentNesting variable in Context. This is an array list of tokens that we are currently "inside" -
$htmlDefinition
Instance of HTMLPurifier_HTMLDefinition -
$inputIndex
Reference to InputIndex variable in Context. This is an integer array index for $this->inputTokens that indicates what token is currently being processed. -
$inputTokens
Reference to InputTokens variable in Context. This is an array list of the input tokens that are being processed. - $objectStack
- $paramStack
-
$rewind
Index of inputTokens to rewind to.
public
- $name
-
$name
Advisory name of injector, this is for friendly error messages - $needed
-
$needed
Array of elements and attributes this injector creates and therefore need to be allowed by the definition. Takes form of array('element' => array('attr', 'attr2'), 'element2')
Methods
public
Inherited from HTMLPurifier_Injector
protected
- backward() — Iterator function, starts with the previous token and continues until you reach the beginning of input tokens.
- current() — Initializes the iterator at the current position. Use in a do {} while; loop to force the _forward and _backward functions to start at the current location.
- forward() — Iterator function, which starts with the next token and continues until you reach the end of the input tokens.
- forwardUntilEndToken() — Similar to _forward, but accepts a third parameter $nesting (which should be initialized at 0) and stops when we hit the end tag for the node $this->inputIndex starts in.
public
- allowsElement() — Tests if the context node allows a certain element
- checkNeeded() — This function checks if the HTML environment will work with the Injector: if p tags are not allowed, the Auto-Paragraphing injector should not be enabled.
- getRewind() — Retrieves rewind, and then unsets it.
- handleElement() — Handler that is called when a start or empty token is processed
- handleEnd() — Handler that is called when an end token is processed
- handleText() — Handler that is called when a text token is processed
- notifyEnd() — Notifier that is called when an end token is processed
- prepare() — Prepares the injector by giving it the config and context objects: this allows references to important variables to be made within the injector. This function also checks if the HTML environment will work with the Injector (see checkNeeded()).
- rewind() — Rewind to a spot to re-perform processing. This is useful if you deleted a node, and now need to see if this change affected any earlier nodes. Rewinding does not affect other injectors, and can result in infinite loops if not used carefully.