mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-02-16 15:19:55 +03:00
fix: enclosure link privacy (#2620)
This commit is contained in:
parent
cce11964a4
commit
dc01891634
1 changed files with 3 additions and 5 deletions
|
@ -67,13 +67,11 @@ class HtmlFormat extends FormatAbstract {
|
|||
$entryEnclosures = '<div class="attachments"><p>Attachments:</p>';
|
||||
|
||||
foreach($item->getEnclosures() as $enclosure) {
|
||||
$template = '<li class="enclosure"><a href="%s" rel="noopener noreferrer nofollow">%s</a></li>';
|
||||
$url = $this->sanitizeHtml($enclosure);
|
||||
$anchorText = substr($url, strrpos($url, '/') + 1);
|
||||
|
||||
$entryEnclosures .= '<li class="enclosure"><a href="'
|
||||
. $url
|
||||
. '">'
|
||||
. substr($url, strrpos($url, '/') + 1)
|
||||
. '</a></li>';
|
||||
$entryEnclosures .= sprintf($template, $url, $anchorText);
|
||||
}
|
||||
|
||||
$entryEnclosures .= '</div>';
|
||||
|
|
Loading…
Add table
Reference in a new issue