summaryrefslogtreecommitdiff
path: root/framework/Web/UI/TTemplate.php
diff options
context:
space:
mode:
authorxue <>2005-11-15 15:43:16 +0000
committerxue <>2005-11-15 15:43:16 +0000
commit2ed19f8d883a72768d07304ec1b6205762801287 (patch)
tree98fe198351758be982679ce2822463d87713d779 /framework/Web/UI/TTemplate.php
parent4c9067bf7ae89b446bb0e236ab20c5b4fa3ee3e3 (diff)
allow quotes around special tags now.
Diffstat (limited to 'framework/Web/UI/TTemplate.php')
-rw-r--r--framework/Web/UI/TTemplate.php11
1 files changed, 9 insertions, 2 deletions
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;
}