mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-01-02 17:19:13 +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:
4
classes/api.php
Normal file → Executable file
4
classes/api.php
Normal file → Executable 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) {
|
||||
|
||||
@@ -610,6 +610,8 @@ class Article extends Handler_Protected {
|
||||
$line = $p->hook_render_article($line);
|
||||
}
|
||||
|
||||
$line['content'] = rewrite_cached_urls($line['content']);
|
||||
|
||||
$num_comments = (int) $line["num_comments"];
|
||||
$entry_comments = "";
|
||||
|
||||
|
||||
@@ -477,6 +477,8 @@ class Feeds extends Handler_Protected {
|
||||
$line = $p->hook_render_article_cdm($line);
|
||||
}
|
||||
|
||||
$line['content'] = rewrite_cached_urls($line['content']);
|
||||
|
||||
if ($vfeed_group_enabled && $line["feed_title"]) {
|
||||
if ($feed_id != $vgroup_last_feed) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user