From 2e5d2a88f39afccefab58b4fb40d22da7794a4b8 Mon Sep 17 00:00:00 2001 From: Dag Date: Tue, 9 Jan 2024 21:36:42 +0100 Subject: [PATCH] fix: only escape iframe,script and link for html output (#3882) --- formats/AtomFormat.php | 2 +- formats/JsonFormat.php | 2 +- formats/MrssFormat.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/formats/AtomFormat.php b/formats/AtomFormat.php index 1fabef2e..5c9f2b6a 100644 --- a/formats/AtomFormat.php +++ b/formats/AtomFormat.php @@ -179,7 +179,7 @@ class AtomFormat extends FormatAbstract $content = $document->createElement('content'); $content->setAttribute('type', 'html'); - $content->appendChild($document->createTextNode(break_annoying_html_tags($entryContent))); + $content->appendChild($document->createTextNode($entryContent)); $entry->appendChild($content); foreach ($item->getEnclosures() as $enclosure) { diff --git a/formats/JsonFormat.php b/formats/JsonFormat.php index 016e75e1..586aae0a 100644 --- a/formats/JsonFormat.php +++ b/formats/JsonFormat.php @@ -47,7 +47,7 @@ class JsonFormat extends FormatAbstract $entryTitle = $item->getTitle(); $entryUri = $item->getURI(); $entryTimestamp = $item->getTimestamp(); - $entryContent = $item->getContent() ? break_annoying_html_tags($item->getContent()) : ''; + $entryContent = $item->getContent() ?? ''; $entryEnclosures = $item->getEnclosures(); $entryCategories = $item->getCategories(); diff --git a/formats/MrssFormat.php b/formats/MrssFormat.php index e93a8289..aaa1d0cd 100644 --- a/formats/MrssFormat.php +++ b/formats/MrssFormat.php @@ -119,7 +119,7 @@ class MrssFormat extends FormatAbstract $itemTimestamp = $item->getTimestamp(); $itemTitle = $item->getTitle(); $itemUri = $item->getURI(); - $itemContent = $item->getContent() ? break_annoying_html_tags($item->getContent()) : ''; + $itemContent = $item->getContent() ?? ''; $itemUid = $item->getUid(); $isPermaLink = 'false';