From: Andrew Dolgov Date: Sun, 22 Nov 2009 19:56:05 +0000 (+0300) Subject: generate_syndicated_feed: properly pass owner_uid to sanitize_rss() (closes #256) X-Git-Tag: 1.4.0~185^2~1 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ceb0cab568051f1593571904158f30532a63dd4e;p=tt-rss.git generate_syndicated_feed: properly pass owner_uid to sanitize_rss() (closes #256) --- diff --git a/functions.php b/functions.php index 0dae3884..c20ea020 100644 --- a/functions.php +++ b/functions.php @@ -3528,7 +3528,7 @@ print ""; } - print sanitize_rss($link, $line["content_preview"]); + print sanitize_rss($link, $line["content_preview"], false, $owner_uid); print "]]>"; print ""; @@ -3590,10 +3590,12 @@ } */ - 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, // "


    1. "); @@ -3603,7 +3605,7 @@ } - if (get_pref($link, "STRIP_IMAGES")) { + if (get_pref($link, "STRIP_IMAGES", $owner)) { $res = preg_replace('/]+>/is', '', $res);