From 45316a2dda4edbd82445de208c649553b3eac2c9 Mon Sep 17 00:00:00 2001 From: Cvetomir Lazarov Date: Wed, 15 Aug 2018 16:10:54 +0300 Subject: [PATCH] Drop the if-statement that returns the escaper from the view and use the lazy-loaded escaper instead --- .../Placeholder/Container/AbstractStandalone.php | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/Helper/Placeholder/Container/AbstractStandalone.php b/src/Helper/Placeholder/Container/AbstractStandalone.php index ec49658d..c40801e6 100644 --- a/src/Helper/Placeholder/Container/AbstractStandalone.php +++ b/src/Helper/Placeholder/Container/AbstractStandalone.php @@ -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); } @@ -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); }