Skip to content

Commit

Permalink
[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 4b7596c commit 92c3d7c
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion library/Zend/View/Helper/Escape.php
Original file line number Diff line number Diff line change
@@ -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);
}
2 changes: 1 addition & 1 deletion tests/Zend/View/Helper/HtmlListTest.php
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 92c3d7c

Please sign in to comment.