mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-10 07:38:41 +00:00
15 lines
357 B
PHP
15 lines
357 B
PHP
|
<?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);
|
||
|
|
||
|
?>
|