From 9c90ed6b23581fb7db1f293dbfe8faa2802fa89a Mon Sep 17 00:00:00 2001 From: oleibman <10341515+oleibman@users.noreply.github.com> Date: Sat, 14 Sep 2024 05:48:58 -0700 Subject: [PATCH] Used Named Parameter but Still Need to Support Php7.4 --- src/PhpSpreadsheet/Writer/Html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PhpSpreadsheet/Writer/Html.php b/src/PhpSpreadsheet/Writer/Html.php index 2258033584..978d1764c1 100644 --- a/src/PhpSpreadsheet/Writer/Html.php +++ b/src/PhpSpreadsheet/Writer/Html.php @@ -1513,7 +1513,7 @@ private function generateRow(Worksheet $worksheet, array $values, $row, $cellTyp // Hyperlink? if ($worksheet->hyperlinkExists($coordinate) && !$worksheet->getHyperlink($coordinate)->isInternal()) { $url = $worksheet->getHyperlink($coordinate)->getUrl(); - $urldecode = strtolower(html_entity_decode(trim($url), encoding: 'UTF-8')); + $urldecode = strtolower(html_entity_decode(trim($url), ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401, 'UTF-8')); $parseScheme = preg_match('/^(\\w+):/', $urldecode, $matches); if ($parseScheme === 1 && !in_array($matches[1], ['http', 'https', 'file', 'ftp', 's3'], true)) { $cellData = htmlspecialchars($url, Settings::htmlEntityFlags());