Skip to content

Commit 0fd2bec

Browse files
author
Korshenko, Olexii(okorshenko)
committed
Merge pull request #325 from magento-api/api-2.0.1patch
Api 2.0.1patch-addition
2 parents e8d0624 + b00ef5e commit 0fd2bec

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/internal/Magento/Framework/Data/Form/FormKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function getFormKey()
5252
if (!$this->isPresent()) {
5353
$this->set($this->mathRandom->getRandomString(16));
5454
}
55-
return $this->escaper->escapeHtml($this->session->getData(self::FORM_KEY));
55+
return $this->escaper->escapeHtmlAttr($this->session->getData(self::FORM_KEY));
5656
}
5757

5858
/**

lib/internal/Magento/Framework/Data/Test/Unit/Form/FormKeyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function setUp()
3838
$methods = ['setData', 'getData'];
3939
$this->sessionMock = $this->getMock('Magento\Framework\Session\SessionManager', $methods, [], '', false);
4040
$this->escaperMock = $this->getMock('Magento\Framework\Escaper', [], [], '', false);
41-
$this->escaperMock->expects($this->any())->method('escapeHtml')->willReturnArgument(0);
41+
$this->escaperMock->expects($this->any())->method('escapeHtmlAttr')->willReturnArgument(0);
4242
$this->formKey = new FormKey(
4343
$this->mathRandomMock,
4444
$this->sessionMock,

lib/internal/Magento/Framework/Escaper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
/**
99
* Magento escape methods
1010
*/
11-
class Escaper
11+
class Escaper extends \Zend\Escaper\Escaper
1212
{
1313
/**
1414
* Escape html entities

0 commit comments

Comments
 (0)