Omeka_Controller_Plugin_HtmlPurifier

Package: Controller\Plugin

class Omeka_Controller_Plugin_HtmlPurifier

extends Zend_Controller_Plugin_Abstract

This ZF controller plugin allows the HtmlPurifier to filter the existing forms (items, collections, users, etc.) so that fields that are allowed to contain HTML are properly filtered.

Note that this will not operate on any of the plugins.

Omeka_Controller_Plugin_HtmlPurifier::routeStartup(Zend_Controller_Request_Abstract $request)

Add the HtmlPurifier options if needed.

Parameters:
  • $request (Zend_Controller_Request_Abstract) –
Omeka_Controller_Plugin_HtmlPurifier::preDispatch(Zend_Controller_Request_Abstract $request)

Determine whether or not to filter form submissions for various controllers.

Parameters:
  • $request (Zend_Controller_Request_Abstract) –
Omeka_Controller_Plugin_HtmlPurifier::isFormSubmission($request)

Determine whether or not the request contains a form submission to either the ‘add’, ‘edit’, or ‘config’ actions.

Parameters:
  • $request (Zend_Controller_Request_Abstract) –
Returns:

bool

Omeka_Controller_Plugin_HtmlPurifier::filterCollectionsForm($request, $htmlPurifierFilter = null)

Filter the Collections form post, including the ‘Elements’ array of the POST.

Parameters:
Omeka_Controller_Plugin_HtmlPurifier::filterThemesForm($request, $htmlPurifierFilter = null)

Purify all of the data in the theme settings

Parameters:
Omeka_Controller_Plugin_HtmlPurifier::_purifyArray($dataArray = array(), $htmlPurifierFilter = null)

Recurisvely purify an array

Parameters:
Returns:

array A purified array of string or array values

Omeka_Controller_Plugin_HtmlPurifier::filterItemsForm($request, $htmlPurifierFilter = null)

Filter the Items form post, including the ‘Elements’ array of the POST.

Parameters:
Omeka_Controller_Plugin_HtmlPurifier::_filterElementsFromPost($post, $htmlPurifierFilter = null)

Filter the ‘Elements’ array of the POST.

Parameters:
Omeka_Controller_Plugin_HtmlPurifier::_setupHtmlPurifierOptions()