From 38803266f854148a3dafad41396bc758e9a65e5f Mon Sep 17 00:00:00 2001
From: ORelio <ORelio@users.noreply.github.com>
Date: Sun, 30 Mar 2025 12:52:28 +0200
Subject: [PATCH] [FeedExpander] Keep content at end of document for now

Will add back later if more sites have the same issue
---
 lib/FeedExpander.php | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/lib/FeedExpander.php b/lib/FeedExpander.php
index b9443caf..a5a55814 100644
--- a/lib/FeedExpander.php
+++ b/lib/FeedExpander.php
@@ -66,23 +66,7 @@ abstract class FeedExpander extends BridgeAbstract
             '&raquo;',
             '&rsquo;',
         ];
-        $xmlString = str_replace($problematicStrings, '', $xmlString);
-
-        // Remove extra content at the end of the document, if any (#4485)
-        // First retrieve tag name of root node, which is the first node following <?xml prolog,
-        // Then find the last matching </tag> in xml string and strip anything beyond that.
-        if (preg_match('/(?:<\?xml[^>]*\?>[^<]*<)([^ "\'>]+)/i', $xmlString, $matches) === 1) {
-            $root_node_tag = $matches[1];
-            $last_closing_occurrence = strripos($xmlString, '</' . $root_node_tag);
-            if ($last_closing_occurrence !== false) {
-                $closing_node_end = strpos($xmlString, '>', $last_closing_occurrence);
-                if ($closing_node_end !== false) {
-                    $xmlString = substr($xmlString, 0, $closing_node_end + 1);
-                }
-            }
-        }
-
-        return $xmlString;
+        return str_replace($problematicStrings, '', $xmlString);
     }
 
     public function getURI()