We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d54f921 commit 02e7e2bCopy full SHA for 02e7e2b
2 files changed
src/Latte/Compiler/Escaper.php
@@ -18,7 +18,7 @@
18
/**
19
* Context-aware escaping.
20
*/
21
-final class Escaper
+class Escaper
22
{
23
public const
24
Text = 'text',
src/Latte/Compiler/PrintContext.php
@@ -36,8 +36,9 @@ public function __construct(
36
string $contentType = ContentType::Html,
37
/** @var array<string, bool> */
38
private array $features = [],
39
+ ?Escaper $escaper = null,
40
) {
- $this->escaperStack[] = new Escaper($contentType);
41
+ $this->escaperStack[] = $escaper ?? new Escaper($contentType);
42
}
43
44
0 commit comments