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

Commit 3739f4f

Browse files
thexpandweierophinney
authored andcommitted
Drop the if-statement that returns the escaper from the view and use the lazy-loaded escaper instead
1 parent 80f9ea1 commit 3739f4f

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

src/Helper/Placeholder/Container/AbstractStandalone.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,6 @@ public function toString()
166166
*/
167167
protected function escape($string)
168168
{
169-
if ($this->getView() instanceof RendererInterface
170-
&& method_exists($this->getView(), 'getEncoding')
171-
) {
172-
$escaper = $this->getView()->plugin('escapeHtml');
173-
return $escaper((string) $string);
174-
}
175-
176169
return $this->getEscaper()->escapeHtml((string) $string);
177170
}
178171

@@ -184,13 +177,6 @@ protected function escape($string)
184177
*/
185178
protected function escapeAttribute($string)
186179
{
187-
if ($this->getView() instanceof RendererInterface
188-
&& method_exists($this->getView(), 'getEncoding')
189-
) {
190-
$escaper = $this->getView()->plugin('escapeHtmlAttr');
191-
return $escaper((string) $string);
192-
}
193-
194180
return $this->getEscaper()->escapeHtmlAttr((string) $string);
195181
}
196182

0 commit comments

Comments
 (0)