From 711662948768492e8d05b778a7d80eacaec368d2 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 22 Mar 2022 11:26:22 +0300 Subject: [PATCH] af_readability: ask readability-php library to fix relative URLs --- plugins/af_readability/init.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php index f9b49329f..7027db4a7 100755 --- a/plugins/af_readability/init.php +++ b/plugins/af_readability/init.php @@ -218,7 +218,11 @@ class Af_Readability extends Plugin { } try { - $r = new Readability(new Configuration()); + + $r = new Readability(new Configuration([ + 'fixRelativeURLs' => true, + 'originalURL' => $url, + ])); if ($r->parse($tmp)) {