Skip to content

Commit

Permalink
Merge pull request #325 from magento-api/api-2.0.1patch
Browse files Browse the repository at this point in the history
Api 2.0.1patch-addition
  • Loading branch information
Korshenko, Olexii(okorshenko) committed Jan 19, 2016
2 parents e8d0624 + b00ef5e commit 0fd2bec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/Data/Form/FormKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getFormKey()
if (!$this->isPresent()) {
$this->set($this->mathRandom->getRandomString(16));
}
return $this->escaper->escapeHtml($this->session->getData(self::FORM_KEY));
return $this->escaper->escapeHtmlAttr($this->session->getData(self::FORM_KEY));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ protected function setUp()
$methods = ['setData', 'getData'];
$this->sessionMock = $this->getMock('Magento\Framework\Session\SessionManager', $methods, [], '', false);
$this->escaperMock = $this->getMock('Magento\Framework\Escaper', [], [], '', false);
$this->escaperMock->expects($this->any())->method('escapeHtml')->willReturnArgument(0);
$this->escaperMock->expects($this->any())->method('escapeHtmlAttr')->willReturnArgument(0);
$this->formKey = new FormKey(
$this->mathRandomMock,
$this->sessionMock,
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/Escaper.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Magento escape methods
*/
class Escaper
class Escaper extends \Zend\Escaper\Escaper
{
/**
* Escape html entities
Expand Down

0 comments on commit 0fd2bec

Please sign in to comment.