mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 20:45:55 +00:00
add plugin to cache images in starred articles; pass article_id to
sanitize
This commit is contained in:
@@ -2760,7 +2760,7 @@
|
||||
|
||||
}
|
||||
|
||||
function sanitize($str, $force_remove_images = false, $owner = false, $site_url = false, $highlight_words = false) {
|
||||
function sanitize($str, $force_remove_images = false, $owner = false, $site_url = false, $highlight_words = false, $article_id = false) {
|
||||
if (!$owner) $owner = $_SESSION["uid"];
|
||||
|
||||
$res = trim($str); if (!$res) return '';
|
||||
@@ -2846,7 +2846,7 @@
|
||||
$disallowed_attributes = array('id', 'style', 'class');
|
||||
|
||||
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_SANITIZE) as $plugin) {
|
||||
$retval = $plugin->hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes);
|
||||
$retval = $plugin->hook_sanitize($doc, $site_url, $allowed_elements, $disallowed_attributes, $article_id);
|
||||
if (is_array($retval)) {
|
||||
$doc = $retval[0];
|
||||
$allowed_elements = $retval[1];
|
||||
@@ -3183,7 +3183,7 @@
|
||||
|
||||
$line["content"] = sanitize($line["content"],
|
||||
sql_bool_to_bool($line['hide_images']),
|
||||
$owner_uid, $line["site_url"]);
|
||||
$owner_uid, $line["site_url"], false, $line["id"]);
|
||||
|
||||
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE) as $p) {
|
||||
$line = $p->hook_render_article($line);
|
||||
|
||||
Reference in New Issue
Block a user