Update ImageProxy code

fix https://github.com/FreshRSS/Extensions/issues/202
Note: breaking changes. Users will have to save their configuration again
This commit is contained in:
Alexandre Alapetite 2025-01-13 00:09:47 +01:00
parent c726958f3f
commit 7e956c93e4
No known key found for this signature in database
GPG key ID: A24378C38E812B23
6 changed files with 84 additions and 61 deletions

View file

@ -218,13 +218,13 @@ final class YouTubeExtension extends Minz_Extension
// but we keep it in the content anyway, so RSS clients can extract it to display a preview where it wants (in article listing,
// by example, like with Reeder).
if ($thumbnails->length > 0 && $thumbnails[0] instanceof DOMNode) {
$content .= '<p hidden><img class="enclosure-thumbnail" src="' . $thumbnails[0]->nodeValue . '" alt=""/></p>';
$content .= '<p hidden><img class="enclosure-thumbnail" src="' . $thumbnails[0]->nodeValue . '" alt="" /></p>';
}
$content .= $iframe;
if ($descriptions->length > 0 && $descriptions[0] instanceof DOMNode) {
$content .= '<p class="enclosure-description">' . nl2br(htmlentities($descriptions[0]->nodeValue ?? '')) . '</p>';
$content .= '<p class="enclosure-description">' . nl2br(htmlspecialchars($descriptions[0]->nodeValue ?? '', ENT_COMPAT, 'UTF-8'), use_xhtml: true) . '</p>';
}
$content .= "</div>\n";