add new option: ENABLE_TAGWALL
This commit is contained in:
parent
4148e809d3
commit
dff94f6369
3 changed files with 25 additions and 9 deletions
|
@ -163,7 +163,14 @@
|
|||
// These two options enable SMTP authentication when sending
|
||||
// digests. Require DIGEST_SMTP_HOST.
|
||||
|
||||
define('CONFIG_VERSION', 9);
|
||||
define('ENABLE_TAGWALL', true);
|
||||
// Disable this if you are having troubles with Tagwall library which
|
||||
// is used to strip potentially unsafe content from RSS articles. When
|
||||
// disabled, simpler version of processing will be used when needed.
|
||||
// Try disabling when having problems with showing articles and/or
|
||||
// loading feeds.
|
||||
|
||||
define('CONFIG_VERSION', 10);
|
||||
// Expected config version. Please update this option in config.php
|
||||
// if necessary (after migrating all new options from this file).
|
||||
|
||||
|
|
|
@ -73,11 +73,13 @@
|
|||
require_once 'magpierss/rss_utils.inc';
|
||||
}
|
||||
|
||||
if (ENABLE_TAGWALL) {
|
||||
include_once "tw/tw-config.php";
|
||||
include_once "tw/tw.php";
|
||||
include_once TW_SETUP . "paranoya.php";
|
||||
|
||||
$tw_parser = new twParser();
|
||||
}
|
||||
|
||||
function _debug($msg) {
|
||||
$ts = strftime("%H:%M:%S", time());
|
||||
|
@ -3169,10 +3171,17 @@
|
|||
$res = $str;
|
||||
|
||||
if (get_pref($link, "STRIP_UNSAFE_TAGS") || $force_strip_tags) {
|
||||
|
||||
if (ENABLE_TAGWALL) {
|
||||
global $tw_parser;
|
||||
global $tw_paranoya_setup;
|
||||
|
||||
$res = $tw_parser->strip_tags($res, $tw_paranoya_setup);
|
||||
} else {
|
||||
|
||||
$res = strip_tags_long($res, "<p><a><i><em><b><strong><blockquote><br><img><div><span>");
|
||||
|
||||
}
|
||||
|
||||
// $res = preg_replace("/\r\n|\n|\r/", "", $res);
|
||||
// $res = strip_tags_long($res, "<p><a><i><em><b><strong><blockquote><br><img><div><span>");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
require_once "functions.php";
|
||||
|
||||
define('EXPECTED_CONFIG_VERSION', 9);
|
||||
define('EXPECTED_CONFIG_VERSION', 10);
|
||||
define('SCHEMA_VERSION', 23);
|
||||
|
||||
if (!file_exists("config.php")) {
|
||||
|
|
Loading…
Reference in a new issue