From 2aef804f4b2cee7baf569f707eb74c27005d7daa Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 20 Aug 2018 12:12:32 +0300 Subject: 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 --- classes/api.php | 4 ++++ 1 file changed, 4 insertions(+) mode change 100644 => 100755 classes/api.php (limited to 'classes/api.php') diff --git a/classes/api.php b/classes/api.php old mode 100644 new mode 100755 index 4c321d77e..5dbf8dc1f --- a/classes/api.php +++ b/classes/api.php @@ -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) { -- cgit v1.2.3-54-g00ecf