Skip to content
Permalink
Browse files

use lib2 HTML purifier for all code; updates #79, updates #130

  • Loading branch information...
following5 committed Aug 6, 2015
1 parent 1763174 commit b6bdbc4458910eb0f02886ab36a03d540e4d2408
Showing 780 changed files with 28 additions and 61,965 deletions.
@@ -27,13 +27,13 @@
/htdocs/download/*
/htdocs/images/statpics/*
/htdocs/images/uploads/*
/htdocs/lib2/HTMLPurifier/library/HTMLPurifier/DefinitionCache/Serializer/CSS/*
/htdocs/lib2/HTMLPurifier/library/HTMLPurifier/DefinitionCache/Serializer/HTML/*
/htdocs/lib2/HTMLPurifier/library/HTMLPurifier/DefinitionCache/Serializer/URI/*
/htdocs/resource2/tinymce/tiny_mce_*.gz
/htdocs/robots.txt
/htdocs/sitemap*xml*
/htdocs/var/*
/lib/htmlpurifier-4.2.0/library/HTMLPurifier/DefinitionCache/Serializer/CSS/*
/lib/htmlpurifier-4.2.0/library/HTMLPurifier/DefinitionCache/Serializer/HTML/*
/lib/htmlpurifier-4.2.0/library/HTMLPurifier/DefinitionCache/Serializer/URI/*
/local/ocxml11client/data-files
/local/ocxml11client/tmp
/local/ocxml11client/settings.php
@@ -29,10 +29,6 @@ doc documentaion

htdocs everything which regularly runs on the Opencaching website

lib/htmlpurifier-4.2.0
Old HTML purifier version used by lib1 and OKAPI code.
Is being replaced by htdocs/lib2/HTMLPurifier.

local Special-purpose tools which may be used on development or
productive systems.

@@ -96,8 +96,7 @@ PHP libraries
License : "freely available to all" (http://alistapart.com/about)

9. HTML Purifier
Path : lib/htmlpurifier-4.2.0
htdocs/lib2/HTMLPurifier
Path : htdocs/lib2/HTMLPurifier
URI : http://htmlpurifier.org/
License : LGPL

@@ -10,7 +10,7 @@
/****************************************************************************
Unicode Reminder メモ
edit a cache listing
used template(s): editcache
@@ -21,7 +21,7 @@
//prepare the templates and include all neccessary
require_once('./lib/common.inc.php');
require_once($opt['rootpath'] . '../lib/htmlpurifier-4.2.0/library/HTMLPurifier.auto.php');
require_once('./lib2/OcHTMLPurifier.class.php');
//Preprocessing
if ($error == false)
@@ -142,7 +142,7 @@
}
// Filter Input
$purifier = new HTMLPurifier();
$purifier = new OcHTMLPurifier($opt);
$desc = $purifier->purify($desc);
}
else
@@ -26,7 +26,7 @@
require_once('./lib/common.inc.php');
require_once('./lib2/logic/logtypes.inc.php');
require($stylepath.'/smilies.inc.php');
require_once($opt['rootpath'] . '../lib/htmlpurifier-4.2.0/library/HTMLPurifier.auto.php');
require_once('./lib2/OcHTMLPurifier.class.php');
require_once('./lib/recommendation.inc.php');
//Preprocessing
@@ -179,7 +179,7 @@
}
// check input
$purifier = new HTMLPurifier();
$purifier = new OcHTMLPurifier($opt);
$log_text = $purifier->purify($log_text);
}
else
@@ -186,4 +186,9 @@
$opt['template']['locales']['PT']['show'] = false;
$opt['template']['locales']['RU']['show'] = false;
/*
* html purifier
*/
$opt['html_purifier']['cache_path'] = dirname(__FILE__).'/../cache2/html_purifier/';
?>
@@ -153,6 +153,11 @@
$opt['logic']['admin']['enable_listing_admins'] = false;
$opt['logic']['admin']['listingadmin_notification'] = 'contact@opencaching.xx';
/*
* html purifier
*/
$opt['html_purifier']['cache_path'] = dirname(__FILE__).'/../cache2/html_purifier/';
// see config2/settings-dist.inc.php
$opt['template']['default']['locale'] = 'DE'; // may be overwritten by $opt['domain'][...]['locale']
$opt['template']['default']['country'] = 'DE'; // may be overwritten by $opt['domain'][...]['country']
@@ -5,13 +5,15 @@
* Unicode Reminder メモ
***************************************************************************/
require_once($opt['rootpath'] . 'lib2/HTMLPurifier/library/HTMLPurifier.auto.php');
require_once(__DIR__ . '/HTMLPurifier/library/HTMLPurifier.auto.php');
// !! THIS CODE IS ALSO USED IN OKAPI !!
// Any changes must be tested with OKAPI services/logs/submit method.
// Avoid to include any other OC.de code here.
// Also used for lib1 code.
class OcHTMLPurifier extends HTMLPurifier
{
@@ -19,7 +19,7 @@
//prepare the templates and include all neccessary
require_once('./lib/common.inc.php');
require_once($opt['rootpath'] . '../lib/htmlpurifier-4.2.0/library/HTMLPurifier.auto.php');
require_once('./lib2/OcHTMLPurifier.class.php');
$no_tpl_build = false;
@@ -754,7 +754,7 @@
if ($descMode != 1)
{
// Filter Input
$purifier = new HTMLPurifier();
$purifier = new OcHTMLPurifier($opt);
$desc = $purifier->purify($desc);
tpl_set_var('desc', htmlspecialchars($desc, ENT_COMPAT, 'UTF-8'));
@@ -19,7 +19,7 @@
//prepare the templates and include all neccessary
require_once('./lib/common.inc.php');
require_once($opt['rootpath'] . '../lib/htmlpurifier-4.2.0/library/HTMLPurifier.auto.php');
require_once('./lib2/OcHTMLPurifier.class.php');
//Preprocessing
if ($error == false)
@@ -80,7 +80,7 @@
if ($descMode != 1)
{
// Filter Input
$purifier = new HTMLPurifier();
$purifier = new OcHTMLPurifier($opt);
$desc = $purifier->purify($desc);
}
@@ -6,7 +6,7 @@
***************************************************************************/
require('./lib2/web.inc.php');
require_once($opt['rootpath'] . '../lib/htmlpurifier-4.2.0/library/HTMLPurifier.auto.php');
require_once('./lib2/OcHTMLPurifier.class.php');
$tpl->name = 'newstopic';
$tpl->menuitem = MNU_START_NEWS_POST;
@@ -40,7 +40,7 @@
$newstext = htmlspecialchars($newstext, ENT_COMPAT, 'UTF-8');
else
{
$purifier = new HTMLPurifier();
$purifier = new OcHTMLPurifier($opt);
$newstext = $purifier->purify($newstext);
}

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Oops, something went wrong.

0 comments on commit b6bdbc4

Please sign in to comment.
You can’t perform that action at this time.