{{toc numerate=1}}
===Simple usage===
Simple usage is really simple:
%%(php)
<?php
require_once 'class/safehtml.php';
$parser = new SafeHTML;
$result = $parser->parse($doc);
?>
%%
===Advanced usage===
====Blacklist====
%%(php)
<?php
require_once 'class/safehtml.php';
$parser = new SafeHTML;
$parser->protocolFiltering = 'black'; // 'white' (default)
$result = $parser->parse($doc);
?>
%%
====Set Allow Tags====
%%(php)
<?php
require_once 'class/safehtml.php';
$parser = new SafeHTML;
$parser->setAllowTags(['body']);
$result = $parser->parse($doc);
?>
%%