mirror of
https://github.com/friendica/friendica
synced 2025-05-21 01:04:19 +02:00
Update HTMLPurifier to v4.7.0
This commit is contained in:
parent
3c97a6703c
commit
c28109ca94
465 changed files with 22433 additions and 10865 deletions
25
library/ezyang/htmlpurifier/library/HTMLPurifier.func.php
Normal file
25
library/ezyang/htmlpurifier/library/HTMLPurifier.func.php
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Defines a function wrapper for HTML Purifier for quick use.
|
||||
* @note ''HTMLPurifier()'' is NOT the same as ''new HTMLPurifier()''
|
||||
*/
|
||||
|
||||
/**
|
||||
* Purify HTML.
|
||||
* @param string $html String HTML to purify
|
||||
* @param mixed $config Configuration to use, can be any value accepted by
|
||||
* HTMLPurifier_Config::create()
|
||||
* @return string
|
||||
*/
|
||||
function HTMLPurifier($html, $config = null)
|
||||
{
|
||||
static $purifier = false;
|
||||
if (!$purifier) {
|
||||
$purifier = new HTMLPurifier();
|
||||
}
|
||||
return $purifier->purify($html, $config);
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
Loading…
Add table
Add a link
Reference in a new issue