From 99375194f6d857d7ac44292ae6feedb35f4a95c0 Mon Sep 17 00:00:00 2001 From: Christoph Potas Date: Tue, 6 Nov 2018 15:08:55 +0100 Subject: [PATCH] ~ dont escape pairs in Parser::parsePair Signed-off-by: Christoph Potas --- system/View/Parser.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/View/Parser.php b/system/View/Parser.php index c3a0273a1c67..9392313c73ed 100644 --- a/system/View/Parser.php +++ b/system/View/Parser.php @@ -371,6 +371,7 @@ protected function parsePair(string $variable, array $data, string $template): a } $temp = []; + $pairs = []; $out = $match[1]; foreach ($row as $key => $val) { @@ -382,6 +383,7 @@ protected function parsePair(string $variable, array $data, string $template): a if ( ! empty($pair)) { + $pairs[array_keys( $pair )[0]] = true; $temp = array_merge($temp, $pair); } @@ -402,7 +404,7 @@ protected function parsePair(string $variable, array $data, string $template): a // Now replace our placeholders with the new content. foreach ($temp as $pattern => $content) { - $out = $this->replaceSingle($pattern, $content, $out, true); + $out = $this->replaceSingle($pattern, $content, $out, !isset( $pairs[$pattern] ) ); } $str .= $out;