From 5bdd526878c69e009b943e214b694a3e7f2d46df Mon Sep 17 00:00:00 2001 From: Lennart Dohmann Date: Mon, 25 Nov 2024 09:01:06 +0100 Subject: [PATCH] Update acceptHtml method to check for 'text/html' instead of '/html' --- lib/EventListener/FileEventsListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/EventListener/FileEventsListener.php b/lib/EventListener/FileEventsListener.php index d03e1ee7..36878a79 100644 --- a/lib/EventListener/FileEventsListener.php +++ b/lib/EventListener/FileEventsListener.php @@ -108,7 +108,7 @@ public function generateBody(Exception $ex): mixed { private function acceptHtml(): bool { foreach (explode(',', $this->request->getHeader('Accept')) as $part) { $subparts = explode(';', $part); - if (str_ends_with($subparts[0], '/html')) { + if (str_ends_with($subparts[0], 'text/html')) { return true; } }