mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-09-25 21:09:51 +00:00
Bugfix: Work item 18794 - CSV files without a file extension being identified as HTML
This commit is contained in:
@@ -134,7 +134,12 @@ class PHPExcel_Reader_HTML implements PHPExcel_Reader_IReader
|
||||
$data = fread($fh, 2048);
|
||||
fclose($fh);
|
||||
|
||||
return true;
|
||||
if ((strpos('<',$data) !== FALSE) &&
|
||||
(strlen($data) !== strlen(strip_tags($data)))) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user