Make the test for filters more strict to prevent unintended parsing

This commit is contained in:
Kijin Sung 2017-02-23 22:14:51 +09:00
parent 5638207fb0
commit d03c64d069

View file

@ -565,7 +565,7 @@ class TemplateHandler
}
// Separate filters from variable.
if (preg_match('@^(.+?)(?<![|\s])\\|([a-z0-9_].+)$@', $m[1], $mm))
if (preg_match('@^(.+?)(?<![|\s])\\|([a-z].+)$@', $m[1], $mm))
{
$m[1] = $mm[1];
$filters = array_map('trim', explode_with_escape('|', $mm[2]));