diff options
author | Andrew Dolgov <[email protected]> | 2009-11-22 22:56:05 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-11-22 22:56:05 +0300 |
commit | ceb0cab568051f1593571904158f30532a63dd4e (patch) | |
tree | d9d52db9524d3975db5b31e872260d764ba6531b | |
parent | 007bb6a748b542dbdf82b978ce34aded0739df5d (diff) |
generate_syndicated_feed: properly pass owner_uid to sanitize_rss() (closes #256)
-rw-r--r-- | functions.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/functions.php b/functions.php index 0dae38842..c20ea020a 100644 --- a/functions.php +++ b/functions.php @@ -3528,7 +3528,7 @@ print "</div>"; } - print sanitize_rss($link, $line["content_preview"]); + print sanitize_rss($link, $line["content_preview"], false, $owner_uid); print "]]></description>"; print "</item>"; @@ -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, // "<p><a><i><em><b><strong><code><pre><blockquote><br><img><ul><ol><li>"); @@ -3603,7 +3605,7 @@ } - if (get_pref($link, "STRIP_IMAGES")) { + if (get_pref($link, "STRIP_IMAGES", $owner)) { $res = preg_replace('/<img[^>]+>/is', '', $res); |