html_clean

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
function print_html_clean($html,$tags=array()) {
global $cfg;
include_once($cfg['dir_adm'].'/lib/php/HtmlCleaner/cleanhtml.class.php');
$xhtml=new HtmlCleaner($html);
if (is_array($tags) && count($tags))
$xhtml->allowedTags($tags);
else
$xhtml->allowedTags(array("<table>","<th>","<td>","<tr>","<tbody>","<thead>","<p>","<ul>","<ol>","<li>"));
return $xhtml->GetCleanedHtml();
}