]> git.wh0rd.org - tt-rss.git/commitdiff
generate_syndicated_feed: properly pass owner_uid to sanitize_rss() (closes #256)
authorAndrew Dolgov <fox@bah.org.ru>
Sun, 22 Nov 2009 19:56:05 +0000 (22:56 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Sun, 22 Nov 2009 19:56:05 +0000 (22:56 +0300)
functions.php

index 0dae388427225f3b12a0a978009b0c6763ec7205..c20ea020ac8e8b1227f96edaa4c0ffed59203120 100644 (file)
                                print "</div>";
                        }
 
-                       print sanitize_rss($link, $line["content_preview"]);
+                       print sanitize_rss($link, $line["content_preview"], false, $owner_uid);
                        print "]]></description>";
   
                        print "</item>";
 } */
 
 
-       function sanitize_rss($link, $str, $force_strip_tags = false) {
+       function sanitize_rss($link, $str, $force_strip_tags = false, $owner = false) {
                $res = $str;
 
-               if (get_pref($link, "STRIP_UNSAFE_TAGS") || $force_strip_tags) {
+               if (!$owner) $owner = $_SESSION["uid"];
+
+               if (get_pref($link, "STRIP_UNSAFE_TAGS", $owner) || $force_strip_tags) {
 
 //                     $res = strip_tags_long($res, 
 //                             "<p><a><i><em><b><strong><code><pre><blockquote><br><img><ul><ol><li>");
 
                }
 
-               if (get_pref($link, "STRIP_IMAGES")) {
+               if (get_pref($link, "STRIP_IMAGES", $owner)) {
                        
                        $res = preg_replace('/<img[^>]+>/is', '', $res);