Minor fix to HTML Reader canRead method (even developers have brainfarts occasionally)

This commit is contained in:
Mark Baker 2013-06-21 22:52:29 +01:00
parent da7cd71be8
commit 6cea3bbf7b

View File

@ -117,7 +117,7 @@ class PHPExcel_Reader_HTML extends PHPExcel_Reader_Abstract implements PHPExcel_
{
// Reading 2048 bytes should be enough to validate that the format is HTML
$data = fread($this->_fileHandle, 2048);
if ((strpos('<',$data) !== FALSE) &&
if ((strpos($data, '<') !== FALSE) &&
(strlen($data) !== strlen(strip_tags($data)))) {
return TRUE;
}