Skip to content

Commit 7d5e143

Browse files
committed
MC-33404: Incorrect display of file name in import history
1 parent 508f751 commit 7d5e143

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Download.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Download extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\Text
2121
public function _getValue(\Magento\Framework\DataObject $row)
2222
{
2323
return '<p> ' . $this->escapeHtml($row->getData('imported_file')) . '</p><a href="'
24-
. $this->escapeUrl($this->getUrl('*/*/download', ['filename' => $row->getData('imported_file')])) . '">'
24+
. $this->getUrl('*/*/download', ['filename' => $row->getData('imported_file')]) . '">'
2525
. $this->escapeHtml(__('Download'))
2626
. '</a>';
2727
}

app/code/Magento/ImportExport/Block/Adminhtml/Grid/Column/Renderer/Error.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public function _getValue(\Magento\Framework\DataObject $row)
2323
$result = '';
2424
if ($row->getData('error_file') != '') {
2525
$result = '<p> ' . $this->escapeHtml($row->getData('error_file')) . '</p><a href="'
26-
. $this->escapeUrl($this->getUrl('*/*/download', ['filename' => $row->getData('error_file')])) . '">'
26+
. $this->getUrl('*/*/download', ['filename' => $row->getData('error_file')]) . '">'
2727
. $this->escapeHtml(__('Download'))
2828
. '</a>';
2929
}

app/code/Magento/ImportExport/Test/Unit/Block/Adminhtml/Grid/Column/Renderer/DownloadTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ public function testGetValue()
7171
->method('escapeHtml')
7272
->with('file.csv')
7373
->willReturn('file.csv');
74-
$this->escaperMock->expects($this->once())->method('escapeUrl')->willReturn('url');
75-
$this->escaperMock->expects($this->at(2))
74+
$this->escaperMock->expects($this->at(1))
7675
->method('escapeHtml')
7776
->with('Download')
7877
->willReturn('Download');

0 commit comments

Comments
 (0)