您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

26 行
576B

  1. <?php
  2. /**
  3. * @file
  4. * Defines a function wrapper for HTML Purifier for quick use.
  5. * @note ''HTMLPurifier()'' is NOT the same as ''new HTMLPurifier()''
  6. */
  7. /**
  8. * Purify HTML.
  9. * @param string $html String HTML to purify
  10. * @param mixed $config Configuration to use, can be any value accepted by
  11. * HTMLPurifier_Config::create()
  12. * @return string
  13. */
  14. function HTMLPurifier($html, $config = null)
  15. {
  16. static $purifier = false;
  17. if (!$purifier) {
  18. $purifier = new HTMLPurifier();
  19. }
  20. return $purifier->purify($html, $config);
  21. }
  22. // vim: et sw=4 sts=4