From 92461ae067970602ac184939368d3d62bdf976a9 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Sun, 10 Jun 2012 22:05:40 +0000 Subject: [PATCH] Set htmlspecialcharacters for text fields git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@91573 2327b42d-5241-43d6-9e2a-de5ac946f064 --- Classes/PHPExcel/Writer/HTML.php | 1 + 1 file changed, 1 insertion(+) diff --git a/Classes/PHPExcel/Writer/HTML.php b/Classes/PHPExcel/Writer/HTML.php index ecc3883b..335dcd0e 100644 --- a/Classes/PHPExcel/Writer/HTML.php +++ b/Classes/PHPExcel/Writer/HTML.php @@ -1060,6 +1060,7 @@ class PHPExcel_Writer_HTML implements PHPExcel_Writer_IWriter { array($this, 'formatColor') ); } + $cellData = htmlspecialchars($cellData); if ($pSheet->getParent()->getCellXfByIndex( $cell->getXfIndex() )->getFont()->getSuperScript()) { $cellData = ''.$cellData.''; } elseif ($pSheet->getParent()->getCellXfByIndex( $cell->getXfIndex() )->getFont()->getSubScript()) {