mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-05 08:07:33 +02:00
[Core] Add html/convertLazyLoading (+ document stripRecursiveHTMLSection) (#3157)
* [core] Add html/convertLazyLoading($dom) Looks for lazy-loading attributes such as 'data-src' and converts them back to regular ones such as 'src', easier for RSS readers. It also converts <picture> elements to plain <img> elements. * [core] Document html/stripRecursiveHTMLSection() Add documentation for that function (no code changes). * [WordPressBridge] Use convertLazyLoading() * [WordPressBridge] Unwrap image figures <img> inside <figure> may not display on RSS readers. This converts them back to <img>, without losing caption if present. * [ZDNet] Convert lazy loading images * [code] html/stripRecursiveHTMLSection: Fix typo
This commit is contained in:
@@ -208,7 +208,7 @@ class ZDNetBridge extends FeedExpander
|
||||
$contents = stripWithDelimiters($contents, '<meta itemprop="image"', '>');
|
||||
$contents = stripWithDelimiters($contents, '<svg class="svg-symbol', '</svg>');
|
||||
$contents = trim(stripWithDelimiters($contents, '<section class="sharethrough-top', '</section>'));
|
||||
$item['content'] = $contents;
|
||||
$item['content'] = convertLazyLoading($contents);
|
||||
|
||||
return $item;
|
||||
}
|
||||
|
Reference in New Issue
Block a user