mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-11 08:05:56 +00:00
af_readability: use data-src for images if available
data-src is popular attribute to store original images for lazy loading via javascript
This commit is contained in:
@@ -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));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user