Skip to content

Commit

Permalink
Used Named Parameter but Still Need to Support Php7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
oleibman committed Sep 14, 2024
1 parent 8b9b378 commit 9c90ed6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PhpSpreadsheet/Writer/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 9c90ed6

Please sign in to comment.