1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 14:25:55 +00:00

split transparent rewriting of locally cached media URLs to execute after both sanitize() and HOOK_RENDER_ARTICLE to allow plugins work on original source URLs consistently

This commit is contained in:
Andrew Dolgov
2018-08-20 12:12:32 +03:00
parent c5c3a0a2a8
commit 2aef804f4b
4 changed files with 65 additions and 24 deletions

4
classes/api.php Normal file → Executable file
View File

@@ -379,6 +379,8 @@ class API extends Handler {
$article = $p->hook_render_article_api(array("article" => $article));
}
$article['content'] = rewrite_cached_urls($article['content']);
array_push($articles, $article);
}
@@ -799,6 +801,8 @@ class API extends Handler {
$headline_row = $p->hook_render_article_api(array("headline" => $headline_row));
}
$headline_row['content'] = rewrite_cached_urls($headline_row['content']);
array_push($headlines, $headline_row);
}
} else if (is_numeric($result) && $result == -1) {