diff options
| author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-04-24 00:44:19 -0400 |
|---|---|---|
| committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-04-24 01:08:48 -0400 |
| commit | f29f32e0d67e88a271702264c37852406f4013d8 (patch) | |
| tree | 6b028bf7ef585d534104849de4b9d1ee67331e07 /phpBB | |
| parent | 203187a8410c411b0bdd90729e19c257ec3a7820 (diff) | |
| download | forums-f29f32e0d67e88a271702264c37852406f4013d8.tar forums-f29f32e0d67e88a271702264c37852406f4013d8.tar.gz forums-f29f32e0d67e88a271702264c37852406f4013d8.tar.bz2 forums-f29f32e0d67e88a271702264c37852406f4013d8.tar.xz forums-f29f32e0d67e88a271702264c37852406f4013d8.zip | |
[feature/template-engine] Allow leading underscores in variable names.
Subsilver uses ._file in overall_header.
PHPBB3-9726
Diffstat (limited to 'phpBB')
| -rw-r--r-- | phpBB/includes/template_compile.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/includes/template_compile.php b/phpBB/includes/template_compile.php index d9eda1d8c2..92695a54fa 100644 --- a/phpBB/includes/template_compile.php +++ b/phpBB/includes/template_compile.php @@ -23,13 +23,13 @@ if (!defined('IN_PHPBB')) */ class phpbb_template_filter extends php_user_filter { - const REGEX_NS = '[a-z][a-z_0-9]+'; + const REGEX_NS = '[a-z_][a-z_0-9]+'; - const REGEX_VAR = '[A-Z][A-Z_0-9]+'; + const REGEX_VAR = '[A-Z_][A-Z_0-9]+'; const REGEX_TAG = '<!-- ([A-Z][A-Z_0-9]+)(?: (.*?) ?)?-->'; - const REGEX_TOKENS = '~<!-- ([A-Z][A-Z_0-9]+)(?: (.*?) ?)?-->|{((?:[a-z][a-z_0-9]+\.)*\\$?[A-Z][A-Z_0-9]+)}~'; + const REGEX_TOKENS = '~<!-- ([A-Z][A-Z_0-9]+)(?: (.*?) ?)?-->|{((?:[a-z_][a-z_0-9]+\.)*\\$?[A-Z][A-Z_0-9]+)}~'; /** * @var array |
