From 03fadc8867a3f0370b245ca0f5e71968900b1be0 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 10 Jan 2024 01:16:03 +0100 Subject: [PATCH] Latte 3.0.14 wip --- src/Bridges/ApplicationLatte/Nodes/ControlNode.php | 5 +++++ src/Bridges/ApplicationLatte/Nodes/LinkNode.php | 1 + 2 files changed, 6 insertions(+) diff --git a/src/Bridges/ApplicationLatte/Nodes/ControlNode.php b/src/Bridges/ApplicationLatte/Nodes/ControlNode.php index 2a28c4640..19c6afc6a 100644 --- a/src/Bridges/ApplicationLatte/Nodes/ControlNode.php +++ b/src/Bridges/ApplicationLatte/Nodes/ControlNode.php @@ -64,6 +64,11 @@ public static function create(Tag $tag): static } $modifier = $tag->parser->parseModifier(); + /*$modifier->defineFlags('noescape'); // v3.0.14? + $node->escape = $modifier->escape; + if ($modifier->filters) { + throw new Latte\CompileException('Only modifier |noescape is allowed here.', reset($modifier->filters)->position); + }*/ foreach ($modifier->filters as $filter) { match ($filter->name->name) { 'noescape' => $node->escape = false, diff --git a/src/Bridges/ApplicationLatte/Nodes/LinkNode.php b/src/Bridges/ApplicationLatte/Nodes/LinkNode.php index 897dd3937..2f5d15820 100644 --- a/src/Bridges/ApplicationLatte/Nodes/LinkNode.php +++ b/src/Bridges/ApplicationLatte/Nodes/LinkNode.php @@ -39,6 +39,7 @@ public static function create(Tag $tag): ?static $tag->parser->stream->tryConsume(','); $node->args = $tag->parser->parseArguments(); $node->modifier = $tag->parser->parseModifier(); + $node->modifier->defineFlags('noescape'); // v 3.0.14, neni potreba nastavovat $escape a $check $node->modifier->escape = true; $node->modifier->check = false; $node->mode = $tag->name;