mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 20:12:14 +09:00
Object XSS defense with HTML Purifier
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10580 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7ea7157ce7
commit
9c5fa20b24
1 changed files with 10 additions and 1 deletions
|
|
@ -697,6 +697,15 @@
|
||||||
// xmp tag 확인 및 추가
|
// xmp tag 확인 및 추가
|
||||||
$content = checkXmpTag($content);
|
$content = checkXmpTag($content);
|
||||||
|
|
||||||
|
// purifier setting
|
||||||
|
require_once _XE_PATH_.'classes/security/htmlpurifier/library/HTMLPurifier.auto.php';
|
||||||
|
require_once 'HTMLPurifier.func.php';
|
||||||
|
|
||||||
|
$config = HTMLPurifier_Config::createDefault();
|
||||||
|
$config->set('HTML.TidyLevel', 'light');
|
||||||
|
$config->set('HTML.SafeObject', true);
|
||||||
|
$purifier = new HTMLPurifier($config);
|
||||||
|
$content = $purifier->purify($content);
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue