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

cacheConfig.php 470B

1234567891011121314
  1. <?php
  2. require_once 'common.php';
  3. $config = HTMLPurifier_Config::createDefault();
  4. $config->set('HTML.Doctype', 'HTML 4.01 Strict');
  5. $config->set('HTML.Allowed', 'b,a[href],br');
  6. $config->set('CSS.AllowTricky', true);
  7. $config->set('URI.Disable', true);
  8. $serial = $config->serialize();
  9. $result = unserialize($serial);
  10. $purifier = new HTMLPurifier($result);
  11. echo htmlspecialchars($purifier->purify('<b>Bold</b><br><i><a href="http://google.com">no</a> formatting</i>'));