Skip to content

Commit 02e7e2b

Browse files
committed
wip
1 parent d54f921 commit 02e7e2b

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/Latte/Compiler/Escaper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
/**
1919
* Context-aware escaping.
2020
*/
21-
final class Escaper
21+
class Escaper
2222
{
2323
public const
2424
Text = 'text',

src/Latte/Compiler/PrintContext.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ public function __construct(
3636
string $contentType = ContentType::Html,
3737
/** @var array<string, bool> */
3838
private array $features = [],
39+
?Escaper $escaper = null,
3940
) {
40-
$this->escaperStack[] = new Escaper($contentType);
41+
$this->escaperStack[] = $escaper ?? new Escaper($contentType);
4142
}
4243

4344

0 commit comments

Comments
 (0)