Merge pull request #14152 from annando/feed-no-html

Log the feed fix only if it has an effect.
This commit is contained in:
Tobias Diekershoff 2024-05-13 06:29:02 +02:00 committed by GitHub
commit 9ae4a17977
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -549,9 +549,11 @@ class Feed
}
if (!HTML::isHTML($body)) {
$original = $body;
$body = BBCode::convert($body, false, BBCode::EXTERNAL);
Logger::debug('Body contained no HTML', ['original' => $original, 'converted' => $body]);
$html = BBCode::convert($body, false, BBCode::EXTERNAL);
if ($body != $html) {
Logger::debug('Body contained no HTML', ['original' => $body, 'converted' => $html]);
$body = $html;
}
}
$item['body'] = HTML::toBBCode($body, $basepath);