summaryrefslogtreecommitdiff
path: root/classes/api.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2018-08-20 12:12:32 +0300
committerAndrew Dolgov <[email protected]>2018-08-20 12:12:32 +0300
commit2aef804f4b2cee7baf569f707eb74c27005d7daa (patch)
treedf0fde6d09857421cb0084e144a4f8e7edde2e2b /classes/api.php
parentc5c3a0a2a8febaa2b1ebcae6c17ff4398a9da6c7 (diff)
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
Diffstat (limited to 'classes/api.php')
-rwxr-xr-x[-rw-r--r--]classes/api.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/classes/api.php b/classes/api.php
index 4c321d77e..5dbf8dc1f 100644..100755
--- 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) {