mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-18 15:51:29 +00:00
generate_syndicated_feed: properly pass owner_uid to sanitize_rss() (closes #256)
This commit is contained in:
@@ -3528,7 +3528,7 @@
|
|||||||
print "</div>";
|
print "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
print sanitize_rss($link, $line["content_preview"]);
|
print sanitize_rss($link, $line["content_preview"], false, $owner_uid);
|
||||||
print "]]></description>";
|
print "]]></description>";
|
||||||
|
|
||||||
print "</item>";
|
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;
|
$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,
|
// $res = strip_tags_long($res,
|
||||||
// "<p><a><i><em><b><strong><code><pre><blockquote><br><img><ul><ol><li>");
|
// "<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);
|
$res = preg_replace('/<img[^>]+>/is', '', $res);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user