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)) { if (!HTML::isHTML($body)) {
$original = $body; $html = BBCode::convert($body, false, BBCode::EXTERNAL);
$body = BBCode::convert($body, false, BBCode::EXTERNAL); if ($body != $html) {
Logger::debug('Body contained no HTML', ['original' => $original, 'converted' => $body]); Logger::debug('Body contained no HTML', ['original' => $body, 'converted' => $html]);
$body = $html;
}
} }
$item['body'] = HTML::toBBCode($body, $basepath); $item['body'] = HTML::toBBCode($body, $basepath);