From d1f9b6c23240c1528065c5590b25620bf6206e4c Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 18 Apr 2025 14:59:46 +0200 Subject: SimplePie: Fix support for feeds with XML preample + DTD (#7515) Regression from https://github.com/FreshRSS/FreshRSS/pull/4374 fix: https://github.com/FreshRSS/FreshRSS/issues/7514 https://github.com/FreshRSS/simplepie/pull/35 Upstream PR: https://github.com/simplepie/simplepie/pull/914 --- lib/simplepie/simplepie/src/Parser.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'lib/simplepie') diff --git a/lib/simplepie/simplepie/src/Parser.php b/lib/simplepie/simplepie/src/Parser.php index c5f4ac575..d6bdadf07 100644 --- a/lib/simplepie/simplepie/src/Parser.php +++ b/lib/simplepie/simplepie/src/Parser.php @@ -111,7 +111,7 @@ class Parser implements RegistryAware $declaration = $this->registry->create(DeclarationParser::class, [substr($data, 5, $pos - 5)]); if ($declaration->parse()) { $data = substr($data, $pos + 2); - $data = 'version . '" encoding="' . $encoding . '" standalone="' . (($declaration->standalone) ? 'yes' : 'no') . '"?>' ."\n". $this->declare_html_entities() . $data; + $data = 'version . '" encoding="' . $encoding . '" standalone="' . (($declaration->standalone) ? 'yes' : 'no') . '"?>' . "\n" . $data; } else { $this->error_string = 'SimplePie bug! Please report this!'; return false; @@ -643,13 +643,6 @@ class Parser implements RegistryAware $this->data = ['child' => ['' => ['rss' => $rss]]]; return true; } - - private function declare_html_entities(): string - { - // This is required because the RSS specification says that entity-encoded - // html is allowed, but the xml specification says they must be declared. - return ' ]>'; - } } class_alias('SimplePie\Parser', 'SimplePie_Parser'); -- cgit v1.2.3