From 6370970f13d58f617379da64efb1f88a522f3f03 Mon Sep 17 00:00:00 2001 From: Nathan Guse Date: Fri, 8 Nov 2013 22:30:58 -0600 Subject: [ticket/11943] Split fix_inline_variable_tokens into 3 steps DEFINE shouldn't add/remove surrounding quotes, but must have the inline variable tokens fixed PHPBB3-11943 --- phpBB/phpbb/template/twig/lexer.php | 60 ++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 10 deletions(-) (limited to 'phpBB/phpbb/template/twig/lexer.php') diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index efd6a0bd84..f4efc58540 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -68,8 +68,20 @@ class lexer extends \Twig_Lexer ); // Fix tokens that may have inline variables (e.g. #', '', $code); + } + /** * Fix tokens that may have inline variables * - * E.g. "; + return ""; }; return preg_replace_callback('##', $callback, $code); } + /** + * Add surrounding quotes + * + * Last step to fix tokens that may have inline variables + * E.g. #', '', $code); + } + /** * Fix begin tokens (convert our BEGIN to Twig for) * -- cgit v1.2.1