Skip to content
Permalink
Browse files Browse the repository at this point in the history
Apply HTML filtering to files form
(fix #935)
  • Loading branch information
zerocrates committed Feb 3, 2021
1 parent 88f26bc commit 08bfdf4
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions application/libraries/Omeka/Controller/Plugin/HtmlPurifier.php
Expand Up @@ -106,6 +106,24 @@ public function filterCollectionsForm($request, $htmlPurifierFilter = null)
$request->setPost($post);
}

/**
* Filter the Files form post, including the 'Elements' array of the POST.
*
* @param Zend_Controller_Request_Abstract $request
* @param Omeka_Filter_HtmlPurifier $htmlPurifierFilter
**/
public function filterFilesForm($request, $htmlPurifierFilter = null)
{
if ($htmlPurifierFilter === null) {
$htmlPurifierFilter = new Omeka_Filter_HtmlPurifier();
}

$post = $request->getPost();
$post = $this->_filterElementsFromPost($post, $htmlPurifierFilter);

$request->setPost($post);
}

/**
* Purify all of the data in the theme settings
*
Expand Down

0 comments on commit 08bfdf4

Please sign in to comment.