mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-23 23:16:53 +00:00
[VkBridge] Handle empty posts before fixing image links (#3052)
This commit is contained in:
parent
6cd8b90d28
commit
2db523a37a
@ -297,6 +297,9 @@ class VkBridge extends BridgeAbstract
|
|||||||
$item = [];
|
$item = [];
|
||||||
$content = strip_tags(backgroundToImg($post->find('div.wall_text', 0)->innertext), '<a><br><img>');
|
$content = strip_tags(backgroundToImg($post->find('div.wall_text', 0)->innertext), '<a><br><img>');
|
||||||
$content .= $content_suffix;
|
$content .= $content_suffix;
|
||||||
|
if (!$content) {
|
||||||
|
$content = '(empty post)';
|
||||||
|
}
|
||||||
$content = str_get_html($content);
|
$content = str_get_html($content);
|
||||||
foreach ($content->find('img') as $img) {
|
foreach ($content->find('img') as $img) {
|
||||||
$parsed_src = parse_url($img->getAttribute('src'));
|
$parsed_src = parse_url($img->getAttribute('src'));
|
||||||
|
Loading…
Reference in New Issue
Block a user