summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfox <[email protected]>2022-01-09 14:54:18 +0300
committerfox <[email protected]>2022-01-09 14:54:18 +0300
commit4a4928ea254ff31034c50751c50a52c725166866 (patch)
tree238245460d77786e38f2c092f3de625628977a0b
parentf1607902e6953aa5c486157835105c0c8f08779f (diff)
parentac6a34f097dfa79ed54e8393514549241f9bdbba (diff)
Merge pull request 'af_readability: use data-src for images if available' (#62) from woodoo/tt-rss:master into master
Reviewed-on: https://git.tt-rss.org/fox/tt-rss/pulls/62
-rwxr-xr-xplugins/af_readability/init.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/af_readability/init.php b/plugins/af_readability/init.php
index a13f2a5b2..cf753ee6b 100755
--- a/plugins/af_readability/init.php
+++ b/plugins/af_readability/init.php
@@ -233,8 +233,13 @@ class Af_Readability extends Plugin {
}
if ($entry->hasAttribute("src")) {
+ if ($entry->hasAttribute("data-src")) {
+ $src = $entry->getAttribute("data-src");
+ } else {
+ $src = $entry->getAttribute("src");
+ }
$entry->setAttribute("src",
- UrlHelper::rewrite_relative(UrlHelper::$fetch_effective_url, $entry->getAttribute("src")));
+ UrlHelper::rewrite_relative(UrlHelper::$fetch_effective_url, $src));
}
}