Merge pull request #1832 from annando/1508-purifier
Relocated the "require_once" for the htmlpurifier
This commit is contained in:
commit
613857ecf1
1 changed files with 5 additions and 2 deletions
|
@ -12,7 +12,6 @@
|
||||||
require_once("mod/item.php");
|
require_once("mod/item.php");
|
||||||
require_once('include/security.php');
|
require_once('include/security.php');
|
||||||
require_once('include/contact_selectors.php');
|
require_once('include/contact_selectors.php');
|
||||||
require_once('library/HTMLPurifier.auto.php');
|
|
||||||
require_once('include/html2bbcode.php');
|
require_once('include/html2bbcode.php');
|
||||||
require_once('mod/wall_upload.php');
|
require_once('mod/wall_upload.php');
|
||||||
require_once("mod/proxy.php");
|
require_once("mod/proxy.php");
|
||||||
|
@ -698,6 +697,9 @@
|
||||||
//$txt = urldecode(requestdata('status'));
|
//$txt = urldecode(requestdata('status'));
|
||||||
|
|
||||||
if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) {
|
if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) {
|
||||||
|
|
||||||
|
require_once('library/HTMLPurifier.auto.php');
|
||||||
|
|
||||||
$txt = html2bb_video($txt);
|
$txt = html2bb_video($txt);
|
||||||
$config = HTMLPurifier_Config::createDefault();
|
$config = HTMLPurifier_Config::createDefault();
|
||||||
$config->set('Cache.DefinitionImpl', null);
|
$config->set('Cache.DefinitionImpl', null);
|
||||||
|
@ -738,12 +740,13 @@
|
||||||
$txt = requestdata('htmlstatus');
|
$txt = requestdata('htmlstatus');
|
||||||
if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) {
|
if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) {
|
||||||
|
|
||||||
|
require_once('library/HTMLPurifier.auto.php');
|
||||||
|
|
||||||
$txt = html2bb_video($txt);
|
$txt = html2bb_video($txt);
|
||||||
|
|
||||||
$config = HTMLPurifier_Config::createDefault();
|
$config = HTMLPurifier_Config::createDefault();
|
||||||
$config->set('Cache.DefinitionImpl', null);
|
$config->set('Cache.DefinitionImpl', null);
|
||||||
|
|
||||||
|
|
||||||
$purifier = new HTMLPurifier($config);
|
$purifier = new HTMLPurifier($config);
|
||||||
$txt = $purifier->purify($txt);
|
$txt = $purifier->purify($txt);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue