From 6cea3bbf7b6cf17659214ed9d1e0ec97cafc49c8 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Fri, 21 Jun 2013 22:52:29 +0100 Subject: [PATCH] Minor fix to HTML Reader canRead method (even developers have brainfarts occasionally) --- Classes/PHPExcel/Reader/HTML.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Reader/HTML.php b/Classes/PHPExcel/Reader/HTML.php index 4780a95..8ebdc9f 100644 --- a/Classes/PHPExcel/Reader/HTML.php +++ b/Classes/PHPExcel/Reader/HTML.php @@ -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; }