From 7232e113d58a629f2a117a6e30e4c8e978e03005 Mon Sep 17 00:00:00 2001 From: Dominik George Date: Fri, 26 Apr 2019 14:29:17 +0200 Subject: [PATCH] Allow single quotes in modifier replacement. This allows more readable templates when using string arguments inside an HTML attribute. --- library/Rain/Tpl/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/Rain/Tpl/Parser.php b/library/Rain/Tpl/Parser.php index 23e340b..b314b9a 100644 --- a/library/Rain/Tpl/Parser.php +++ b/library/Rain/Tpl/Parser.php @@ -629,7 +629,7 @@ protected function modifierReplace($html) { $this->blackList($html); if (strpos($html,'|') !== false && substr($html,strpos($html,'|')+1,1) != "|") { - preg_match('/([\$a-z_A-Z0-9\(\),\[\]"->]+)\|([\$a-z_A-Z0-9\(\):,\[\]"->\s]+)/i', $html,$result); + preg_match('/([\$a-z_A-Z0-9\(\),\[\]"\'->]+)\|([\$a-z_A-Z0-9\(\):,\[\]"\'->\s]+)/i', $html,$result); $function_params = $result[1]; $result[2] = str_replace("::", "@double_dot@", $result[2] );