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

Commit

Permalink
Drop the if-statement that returns the escaper from the view and use …
Browse files Browse the repository at this point in the history
…the lazy-loaded escaper instead
  • Loading branch information
thexpand committed Aug 15, 2018
1 parent 006406d commit 45316a2
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/Helper/Placeholder/Container/AbstractStandalone.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,6 @@ public function toString()
*/
protected function escape($string)
{
if ($this->getView() instanceof RendererInterface
&& method_exists($this->getView(), 'getEncoding')
) {
$escaper = $this->getView()->plugin('escapeHtml');
return $escaper((string) $string);
}

return $this->getEscaper()->escapeHtml((string) $string);
}

Expand All @@ -184,13 +177,6 @@ protected function escape($string)
*/
protected function escapeAttribute($string)
{
if ($this->getView() instanceof RendererInterface
&& method_exists($this->getView(), 'getEncoding')
) {
$escaper = $this->getView()->plugin('escapeHtmlAttr');
return $escaper((string) $string);
}

return $this->getEscaper()->escapeHtmlAttr((string) $string);
}

Expand Down

0 comments on commit 45316a2

Please sign in to comment.