diff options
| author | 2023-01-06 19:53:43 +0100 | |
|---|---|---|
| committer | 2023-01-06 19:53:43 +0100 | |
| commit | 8f9c4143fcc133f28db4c3f618649fb1170e33b4 (patch) | |
| tree | e41532df88fa10766ce7ad729e4c8b88f616ce27 /app/views/helpers | |
| parent | af8480651dea478e2a60dc13b9ea44d364d0f7b7 (diff) | |
Better enclosures (#4944)
* Better enclosures
#fix https://github.com/FreshRSS/FreshRSS/issues/4702
Improvement of https://github.com/FreshRSS/FreshRSS/pull/2898
* A few fixes
* Better enclosure titles
* Improve thumbnails
* Implement thumbnail for HTML+XPath
* Avoid duplicate enclosures
#fix https://github.com/FreshRSS/FreshRSS/issues/1668
* Fix regex
* Add basic support for media:credit
And use <figure> for enclosures
* Fix link encoding + simplify code
* Fix some SimplePie bugs
Encoding errors in enclosure links
* Remove debugging syslog
* Remove debugging syslog
* SimplePie fix multiple RSS2 enclosures
#fix https://github.com/FreshRSS/FreshRSS/issues/4974
* Improve thumbnails
* Performance with yield
Avoid generating all enclosures if not used
* API keep providing enclosures inside content
Clients are typically not showing the enclosures to the users (tested with News+, FeedMe, Readrops, Fluent Reader Lite)
* Lint
* Fix API output enclosure
* Fix API content strcut
* API tolerate enclosures without a type
Diffstat (limited to 'app/views/helpers')
| -rw-r--r-- | app/views/helpers/index/normal/entry_header.phtml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/app/views/helpers/index/normal/entry_header.phtml b/app/views/helpers/index/normal/entry_header.phtml index 43eeb7f8a..92eacf617 100644 --- a/app/views/helpers/index/normal/entry_header.phtml +++ b/app/views/helpers/index/normal/entry_header.phtml @@ -42,8 +42,7 @@ ?><li class="item thumbnail <?= $topline_thumbnail ?> <?= $topline_summary ? '' : 'small' ?>"><?php $thumbnail = $this->entry->thumbnail(); if ($thumbnail != null): - ?><img src="<?= htmlspecialchars($thumbnail['url'], ENT_COMPAT, 'UTF-8') ?>" class="item-element "<?= $lazyload ? ' loading="lazy"' : '' ?><?= - empty($thumbnail['alt']) ? '' : ' alt="' . htmlspecialchars(strip_tags($thumbnail['alt']), ENT_COMPAT, 'UTF-8') . '"' ?> /><?php + ?><img src="<?= $thumbnail['url'] ?>" class="item-element "<?= $lazyload ? ' loading="lazy"' : '' ?> alt="" /><?php endif; ?></li><?php endif; ?> @@ -62,7 +61,7 @@ ?></span><?php endif; if ($topline_summary): - ?><div class="summary"><?= trim(mb_substr(strip_tags($this->entry->content()), 0, 500, 'UTF-8')) ?></div><?php + ?><div class="summary"><?= trim(mb_substr(strip_tags($this->entry->content(false)), 0, 500, 'UTF-8')) ?></div><?php endif; ?></a></li> <?php if ($topline_date) { ?><li class="item date"><time datetime="<?= $this->entry->machineReadableDate() ?>" class="item-element"><?= $this->entry->date() ?></time> </li><?php } ?> |
