diff --git a/common/framework/parsers/template/TemplateParser_v2.php b/common/framework/parsers/template/TemplateParser_v2.php index be9d4088c..84b010e5d 100644 --- a/common/framework/parsers/template/TemplateParser_v2.php +++ b/common/framework/parsers/template/TemplateParser_v2.php @@ -824,8 +824,10 @@ class TemplateParser_v2 // Exclude {single} curly braces in non-HTML contexts. $content = preg_replace_callback('#(<\?php \$this->config->context = \'(?:CSS|JS)\'; \?>)(.*?)(<\?php \$this->config->context = \'HTML\'; \?>)#s', function($match) { - $warning = ''; - $match[2] = preg_replace('#(?' : ''; + return '{' . $warning . $m[1] . '}'; + }, $match[2]); return $match[1] . $match[2] . $match[3]; }, $content); diff --git a/tests/_data/template/v2contextual.executed.html b/tests/_data/template/v2contextual.executed.html index 69847da11..f36d54714 100644 --- a/tests/_data/template/v2contextual.executed.html +++ b/tests/_data/template/v2contextual.executed.html @@ -8,17 +8,16 @@ Hello <"world"> ('string') variable.jpg