| 15 | | $cachePath = sfConfig::get('sf_cache_dir') . '/htmlpurifier'; |
| 16 | | if (!file_exists($cachePath)) |
| 17 | | { |
| 18 | | mkdir($cachePath); |
| 19 | | } |
| 20 | | |
| 21 | | $config = HTMLPurifier_Config::createDefault(); |
| 22 | | $config->set('Cache.SerializerPath', $cachePath); |
| 23 | | $config->set('Attr.EnableID', true); |
| 24 | | $config->set('Attr.AllowedFrameTargets', '_blank, _parent, _self, _top'); |
| 25 | | $purifier = new HTMLPurifier($config); |
| 26 | | |
| 27 | | $object->body = htmlentities($purifier->purify($object->body), ENT_QUOTES, 'UTF-8'); |
| | 15 | $object->body = htmlentities(ullHTMLPurifier::purifyForWiki($object->body), ENT_QUOTES, 'UTF-8'); |