From 6c2a7b9b5674c5c9f0c8e78e32531af43462638c Mon Sep 17 00:00:00 2001 From: xue <> Date: Fri, 5 Jan 2007 01:29:55 +0000 Subject: fixed #489. --- framework/Web/UI/TTemplateManager.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'framework') diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index 332ed7ab..477d4984 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -177,7 +177,7 @@ class TTemplate extends TApplicationComponent implements ITemplate * '<%[%#~\\$=\\[](.*?)%>' - expressions * ')*)\s*\/>' - group subproperty tags */ - const REGEX_RULES='/|<\/?com:([\w\.]+)((?:\s*[\w\.]+\s*=\s*\'.*?\'|\s*[\w\.]+\s*=\s*".*?"|\s*[\w\.]+\s*=\s*<%.*?%>)*)\s*\/?>|<\/?prop:([\w\.]+)\s*>|<%@\s*((?:\s*[\w\.]+\s*=\s*\'.*?\'|\s*[\w\.]+\s*=\s*".*?")*)\s*%>|<%[%#~\\$=\\[](.*?)%>|)*)\s*\/>/msS'; /** * Different configurations of component property/event/attribute @@ -724,15 +724,11 @@ class TTemplate extends TApplicationComponent implements ITemplate } else if(strpos($str,'') // template comments - { - if($expectPropEnd) - throw new TConfigurationException('template_comments_forbidden'); - if($matchStart>$textStart) - $tpl[$c++]=array($container,substr($input,$textStart,$matchStart-$textStart)); - $textStart=$matchEnd+1; - } - // else, HTML comments and we do nothing + if($expectPropEnd) + throw new TConfigurationException('template_comments_forbidden'); + if($matchStart>$textStart) + $tpl[$c++]=array($container,substr($input,$textStart,$matchStart-$textStart)); + $textStart=$matchEnd+1; } else throw new TConfigurationException('template_matching_unexpected',$match); -- cgit v1.2.3