From 990aeac098d961e69ccb5c2277dd1a47c6d86572 Mon Sep 17 00:00:00 2001
From: Bojan Vitnik <bvitnik@mainstream.rs>
Date: Thu, 5 Dec 2024 14:29:33 +0100
Subject: [PATCH] Revert change from 42577bc that introduced side effect in
 ConfigurableWYSIWYGValidator, function validateConfigured()

---
 .../Framework/Validator/HTML/ConfigurableWYSIWYGValidator.php  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lib/internal/Magento/Framework/Validator/HTML/ConfigurableWYSIWYGValidator.php b/lib/internal/Magento/Framework/Validator/HTML/ConfigurableWYSIWYGValidator.php
index b1009b946c6a3..53a4ee979b861 100644
--- a/lib/internal/Magento/Framework/Validator/HTML/ConfigurableWYSIWYGValidator.php
+++ b/lib/internal/Magento/Framework/Validator/HTML/ConfigurableWYSIWYGValidator.php
@@ -110,7 +110,6 @@ public function validate(string $content): void
     private function validateConfigured(\DOMXPath $xpath): void
     {
         //Validating tags
-        $this->allowedTags = array_merge($this->allowedTags, ["body", "html"]);
         $found = $xpath->query(
             '//*['
             . implode(
@@ -119,7 +118,7 @@ private function validateConfigured(\DOMXPath $xpath): void
                     function (string $tag): string {
                         return "name() != '$tag'";
                     },
-                    $this->allowedTags
+                    array_merge($this->allowedTags, ['body', 'html'])
                 )
             )
             .']'