From dc01891634c73d430e44ae54b58a4e5765e8ee78 Mon Sep 17 00:00:00 2001 From: dag Date: Fri, 8 Apr 2022 23:14:43 +0200 Subject: [PATCH] fix: enclosure link privacy (#2620) --- formats/HtmlFormat.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/formats/HtmlFormat.php b/formats/HtmlFormat.php index d995aae6..b9a7aba1 100644 --- a/formats/HtmlFormat.php +++ b/formats/HtmlFormat.php @@ -67,13 +67,11 @@ class HtmlFormat extends FormatAbstract { $entryEnclosures = '

Attachments:

'; foreach($item->getEnclosures() as $enclosure) { + $template = '
  • %s
  • '; $url = $this->sanitizeHtml($enclosure); + $anchorText = substr($url, strrpos($url, '/') + 1); - $entryEnclosures .= '
  • ' - . substr($url, strrpos($url, '/') + 1) - . '
  • '; + $entryEnclosures .= sprintf($template, $url, $anchorText); } $entryEnclosures .= '
    ';