From 37f4a79462b475a27cc0ac4cc5c2c0601e8f3d90 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Tue, 18 Aug 2015 08:38:42 +0200 Subject: [PATCH] Relocated the "require_once" for the htmlpurifier --- include/api.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/api.php b/include/api.php index b6fd1d2de2..2fd7d6d45a 100644 --- a/include/api.php +++ b/include/api.php @@ -12,7 +12,6 @@ require_once("mod/item.php"); require_once('include/security.php'); require_once('include/contact_selectors.php'); - require_once('library/HTMLPurifier.auto.php'); require_once('include/html2bbcode.php'); require_once('mod/wall_upload.php'); require_once("mod/proxy.php"); @@ -698,6 +697,9 @@ //$txt = urldecode(requestdata('status')); if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) { + + require_once('library/HTMLPurifier.auto.php'); + $txt = html2bb_video($txt); $config = HTMLPurifier_Config::createDefault(); $config->set('Cache.DefinitionImpl', null); @@ -738,12 +740,13 @@ $txt = requestdata('htmlstatus'); if((strpos($txt,'<') !== false) || (strpos($txt,'>') !== false)) { + require_once('library/HTMLPurifier.auto.php'); + $txt = html2bb_video($txt); $config = HTMLPurifier_Config::createDefault(); $config->set('Cache.DefinitionImpl', null); - $purifier = new HTMLPurifier($config); $txt = $purifier->purify($txt); -- 2.39.5