]> git.wh0rd.org - tt-rss.git/commitdiff
add new option: ENABLE_TAGWALL
authorAndrew Dolgov <fox@madoka.spb.ru>
Wed, 10 Oct 2007 07:29:43 +0000 (08:29 +0100)
committerAndrew Dolgov <fox@madoka.spb.ru>
Wed, 10 Oct 2007 07:29:43 +0000 (08:29 +0100)
config.php-dist
functions.php
sanity_check.php

index 9060ccaaf221450567d683deeda335109bc0b6f9..b93143711215598b9ba14f1b60cec0ed6610d2a4 100644 (file)
        // 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).
 
index ea991269d9c27debc39f76c91b37e4ad031065d4..f87491d61675243b7a3642466587cc2c1ba02ae2 100644 (file)
                require_once 'magpierss/rss_utils.inc';
        }
 
-       include_once "tw/tw-config.php";
-       include_once "tw/tw.php";
-       include_once TW_SETUP . "paranoya.php";
+       if (ENABLE_TAGWALL) {
+               include_once "tw/tw-config.php";
+               include_once "tw/tw.php";
+               include_once TW_SETUP . "paranoya.php";
 
-       $tw_parser = new twParser();
+               $tw_parser = new twParser();
+       }
 
        function _debug($msg) {
                $ts = strftime("%H:%M:%S", time());
                $res = $str;
 
                if (get_pref($link, "STRIP_UNSAFE_TAGS") || $force_strip_tags) {
-                       global $tw_parser;
-                       global $tw_paranoya_setup;
 
-                       $res = $tw_parser->strip_tags($res, $tw_paranoya_setup);
+                       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>");                       
index 04f717ff952d7d1f22ea0a55913f0e793633e47a..58baf7c30c83d5aa7e8fe1edfb55a48abb8cbca6 100644 (file)
@@ -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")) {