From ad5c394d39c35b48b7cfc4384288e53d268d0aab Mon Sep 17 00:00:00 2001 From: "GODZilla0480@gmail.com" <> Date: Sun, 28 Aug 2011 04:43:21 +0000 Subject: Modifiy TTemplate::parseAttributes to allow definition of "HTML5 Custom Data Attributes (data-*)" e.g Attributes.data-custom-value="foobar" --- framework/Web/UI/TTemplateManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'framework/Web') diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index f0a8dd47..a5e635da 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -823,7 +823,7 @@ class TTemplate extends TApplicationComponent implements ITemplate { if($str==='') return array(); - $pattern='/([\w\.]+)\s*=\s*(\'.*?\'|".*?"|<%.*?%>)/msS'; + $pattern='/([\w\.\-]+)\s*=\s*(\'.*?\'|".*?"|<%.*?%>)/msS'; $attributes=array(); $n=preg_match_all($pattern,$str,$matches,PREG_SET_ORDER|PREG_OFFSET_CAPTURE); for($i=0;$i<$n;++$i) -- cgit v1.2.3