Add zend filter to composer

1.10.x
Francis Gonzales 11 years ago committed by Francis Gonzales
parent 01944953e9
commit 2f7d1313f1
  1. 3
      composer.json
  2. 14
      main/inc/lib/formvalidator/FormValidator.class.php

@ -125,8 +125,7 @@
"stof/doctrine-extensions-bundle": "~1.1@dev",
"gedmo/doctrine-extensions": "~2.3",
"zendframework/zend-filter": "2.3.*@dev",
"jbroadway/urlify": "1.0.0-stable",
"composer/composer": "1.0.*@dev",

@ -1,6 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
use Zend\Filter\StripTags;
/**
* Objects of this class can be used to create/manipulate/validate user input.
*/
@ -669,17 +670,16 @@ EOT;
/**
* Cleans HTML text
* @param string $html HTML to clean
* @param string $html HTML to clean
* @param int $mode (optional)
* @return string The cleaned HTML
* @return string The cleaned HTML
*/
function html_filter($html, $mode = NO_HTML)
{
return $html;
//$filter = new Zend\Filter\StripTags(array('allowTags' => 'a'));
$allowed_tags = HTML_QuickForm_Rule_HTML::get_allowed_tags($mode);
$cleaned_html = kses($html, $allowed_tags);
return $cleaned_html;
$allowedTags = HTML_QuickForm_Rule_HTML::get_allowed_tags($mode);
$filter = new StripTags($allowedTags);
$cleanedHtml = $filter->filter($html);
return $cleanedHtml;
}
function html_filter_teacher($html)

Loading…
Cancel
Save