Omeka_Filter_HtmlPurifier

Package: Filter

class Omeka_Filter_HtmlPurifier

implements Zend_Filter_Interface

A Zend_Filter implementation that uses HtmlPurifier to purify a string.

Omeka_Filter_HtmlPurifier::filter($value)

Filter the value

Parameters:
  • $value
Returns:

string An html purified string

Omeka_Filter_HtmlPurifier::getDefaultAllowedHtmlElements()

Get the default allowed html elements.

Returns:array An array of strings corresponding to the allowed html elements
Omeka_Filter_HtmlPurifier::getDefaultAllowedHtmlAttributes()

Get the default allowed html attributes.

Returns:array An array of strings corresponding to the allowed html attributes
Omeka_Filter_HtmlPurifier::getHtmlPurifier()

Gets the html purifier singleton

Returns:HTMLPurifier $purifier
Omeka_Filter_HtmlPurifier::setHtmlPurifier($purifier)

Sets the html purifier singleton

Parameters:
  • $purifier (HTMLPurifier) –
Omeka_Filter_HtmlPurifier::createHtmlPurifier($allowedHtmlElements = null, $allowedHtmlAttributes = null)
Parameters:
  • $allowedHtmlElements (array) – An array of strings representing allowed HTML elements
  • $allowedHtmlAttributes (array) – An array of strings representing allowed HTML attributes
Returns:

HTMLPurifier

Omeka_Filter_HtmlPurifier::filterAttributesWithMissingElements($htmlAttributes = array(), $htmlElements = array())
Parameters:
  • $htmlAttributes
  • $htmlElements