diff --git a/CHANGE.md b/CHANGE.md index b220580..29db77b 100755 --- a/CHANGE.md +++ b/CHANGE.md @@ -6,6 +6,7 @@ Change Log: `yii2-export` **Date:** 03-Nov-2021 - (enh #353): Enhancements to support Bootstrap v5.x. +- (enh #333): Correct `stripHtml`. - (enh #330): Sanitize file names in a better way. - (enh #328, #329): Allow closure for contentOptions. diff --git a/src/ExportMenu.php b/src/ExportMenu.php index 46afb0c..bf94ae2 100644 --- a/src/ExportMenu.php +++ b/src/ExportMenu.php @@ -2149,10 +2149,10 @@ protected function setHttpHeaders() */ protected function setOutCellValue($sheet, $index, $value, $format = null) { + $value = html_entity_decode($value, ENT_QUOTES, 'UTF-8'); if ($this->stripHtml) { $value = strip_tags($value); } - $value = html_entity_decode($value, ENT_QUOTES, 'UTF-8'); $cell = $sheet->getCell($index); if ($format === null) { $cell->setValue($value);