From 2ed19f8d883a72768d07304ec1b6205762801287 Mon Sep 17 00:00:00 2001 From: xue <> Date: Tue, 15 Nov 2005 15:43:16 +0000 Subject: allow quotes around special tags now. --- framework/Web/UI/TTemplate.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'framework/Web/UI') diff --git a/framework/Web/UI/TTemplate.php b/framework/Web/UI/TTemplate.php index 7683bc1b..5d361119 100644 --- a/framework/Web/UI/TTemplate.php +++ b/framework/Web/UI/TTemplate.php @@ -518,6 +518,15 @@ class TTemplate extends TComponent implements ITemplate { $name=strtolower($matches[$i][1]); $value=$matches[$i][2]; + if($value[0]==='\'' || $value[0]==='"') + { + $value=substr($value,1,strlen($value)-2); + if(!preg_match('/(<%#.*?%>|<%=.*?%>|<%~.*?%>)/msS',$value)) + { + $attributes[$name]=$value; + continue; + } + } if($value[0]==='<') { if($value[2]==='#') // databind @@ -529,8 +538,6 @@ class TTemplate extends TComponent implements ITemplate else $attributes[$name]=substr($value,2,strlen($value)-4); } - else - $attributes[$name]=substr($value,1,strlen($value)-2); } return $attributes; } -- cgit v1.2.3