Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
[zendframework/zendframework#1] change escaping to use ENT_QUOTES
Browse files Browse the repository at this point in the history
- s/ENT_COMPAT/ENT_QUOTES/ in the Escape view helper
  • Loading branch information
weierophinney committed Feb 28, 2012
1 parent cdc5669 commit edb5015
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Helper/Escape.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function getCallback()
if (!is_callable($this->callback)) {
$encoding = $this->getEncoding();
$callback = function($value) use ($encoding) {
return htmlspecialchars($value, ENT_COMPAT, $encoding, false);
return htmlspecialchars($value, ENT_QUOTES, $encoding, false);
};
$this->setCallback($callback);
}
Expand Down
2 changes: 1 addition & 1 deletion test/Helper/HtmlListTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public function testListWithValuesToEscapeForZF2283()

$this->assertContains('<li>one &lt;small&gt; test</li>', $list);
$this->assertContains('<li>second &amp; third</li>', $list);
$this->assertContains('<li>And \'some\' &quot;final&quot; test</li>', $list);
$this->assertContains('<li>And &#039;some&#039; &quot;final&quot; test</li>', $list);
}

public function testListEscapeSwitchedOffForZF2283()
Expand Down

0 comments on commit edb5015

Please sign in to comment.