0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-11-14 09:18:41 +00:00
htmlpurifier/docs/examples/basic.php

15 lines
357 B
PHP
Raw Normal View History

<?php
// This file demonstrates basic usage of HTMLPurifier.
exit; // not to be called directly, it will fail fantastically!
set_include_path('/path/to/htmlpurifier/library' . PATH_SEPARATOR . get_include_path());
require_once 'HTMLPurifier.php';
$purifier = new HTMLPurifier();
$html = '<b>Simple and short';
$pure_html = $purifier->purify($html);
?>