Skip to content

Commit

Permalink
Fix #333: Correct stripHtml
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Nov 3, 2021
1 parent c06855f commit 6b313c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion src/ExportMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6b313c5

Please sign in to comment.