]> git.wh0rd.org Git - tt-rss.git/commitdiff
force disable simplepie unnecessarily sanitizing data
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 26 Feb 2013 14:27:40 +0000 (18:27 +0400)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 26 Feb 2013 14:27:40 +0000 (18:27 +0400)
classes/sanitizedummy.php [new file with mode: 0644]
include/rssfuncs.php

diff --git a/classes/sanitizedummy.php b/classes/sanitizedummy.php
new file mode 100644 (file)
index 0000000..a184bec
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+class SanitizeDummy extends SimplePie_Sanitize {
+       function sanitize($data, $type, $base) {
+               return $data;
+       }
+}
+?>
index b82a872f4aa4d7e886aef1b908469fe9b1ca8c76..bced183f49ab867aa579f32c29dd99c9b706d6bd 100644 (file)
                }
 
                $rss = new SimplePie();
+               $rss->set_sanitize_class("SanitizeDummy");
+               // simplepie ignores the above and creates default sanitizer anyway,
+               // so let's override it...
+               $rss->sanitize = new SanitizeDummy();
                $rss->set_output_encoding('UTF-8');
                $rss->set_raw_data($feed_data);
 
                        }
 
                        foreach ($items as $item) {
-                               if ($_REQUEST['xdebug'] == 2) {
+                               if ($_REQUEST['xdebug'] == 3) {
                                        print_r($item);
                                }
 
 
                                $entry_title = $item->get_title();
 
-                               $entry_link = rewrite_relative_url($site_url, htmlspecialchars_decode($item->get_link()));
+                               $entry_link = rewrite_relative_url($site_url, $item->get_link());
 
                                if ($debug_enabled) {
                                        _debug("update_rss_feed: title $entry_title");