diff options
| -rw-r--r-- | phpBB/phpbb/template/twig/lexer.php | 2 | ||||
| -rw-r--r-- | tests/template/template_test.php | 2 | ||||
| -rw-r--r-- | tests/template/templates/include_define_variable.html | 6 | 
3 files changed, 8 insertions, 2 deletions
| diff --git a/phpBB/phpbb/template/twig/lexer.php b/phpBB/phpbb/template/twig/lexer.php index 8b72a06642..16a693cd7c 100644 --- a/phpBB/phpbb/template/twig/lexer.php +++ b/phpBB/phpbb/template/twig/lexer.php @@ -75,7 +75,7 @@ class phpbb_template_twig_lexer extends Twig_Lexer  		// Fix tokens that may have inline variables (e.g. <!-- DEFINE $TEST = '{FOO}')  		$code = $this->fix_inline_variable_tokens(array( -			'DEFINE \$[a-zA-Z0-9]+ =', +			'DEFINE \$[a-zA-Z0-9_]+ =',  			'INCLUDE',  			'INCLUDEPHP',  			'INCLUDEJS', diff --git a/tests/template/template_test.php b/tests/template/template_test.php index 1649604492..2cca20f4c2 100644 --- a/tests/template/template_test.php +++ b/tests/template/template_test.php @@ -237,7 +237,7 @@ class phpbb_template_template_test extends phpbb_template_template_test_case  				array('VARIABLE' => 'variable.html'),  				array(),  				array(), -				'variable.html', +				"variable.html\nvariable.html\nvariable.html",  			),  			array(  				'include_loop_define.html', diff --git a/tests/template/templates/include_define_variable.html b/tests/template/templates/include_define_variable.html index aff9b574c2..6052657c97 100644 --- a/tests/template/templates/include_define_variable.html +++ b/tests/template/templates/include_define_variable.html @@ -1,2 +1,8 @@  <!-- DEFINE $DEF = '{VARIABLE}' -->  <!-- INCLUDE {$DEF} --> + +<!-- DEFINE $DEF_WITH_UNDERSCORES = '{VARIABLE}' --> +<!-- INCLUDE {$DEF_WITH_UNDERSCORES} --> + +<!-- DEFINE $DEF123 = '{VARIABLE}' --> +<!-- INCLUDE {$DEF123} --> | 
