1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[feature/template-engine] Allow leading underscores in variable names.

Subsilver uses ._file in overall_header.

PHPBB3-9726
This commit is contained in:
Oleg Pudeyev
2011-04-24 00:44:19 -04:00
parent 203187a841
commit f29f32e0d6
3 changed files with 33 additions and 3 deletions

View File

@@ -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