summaryrefslogtreecommitdiff
path: root/framework/Web/UI
diff options
context:
space:
mode:
authorxue <>2006-04-30 12:51:23 +0000
committerxue <>2006-04-30 12:51:23 +0000
commitddfafaac2c1f18aca0fda3b4157acd935b9ac9a2 (patch)
treed131537413fa80aadf44feb8607eca6584e539f7 /framework/Web/UI
parent10b65d6d03ee0afc1ec1a50f320af42a79f5492b (diff)
merge from 3.0 branch till 995.
Diffstat (limited to 'framework/Web/UI')
-rw-r--r--framework/Web/UI/TTemplateManager.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php
index 90070a5a..5f75caf3 100644
--- a/framework/Web/UI/TTemplateManager.php
+++ b/framework/Web/UI/TTemplateManager.php
@@ -151,7 +151,7 @@ class TTemplateManager extends TModule
class TTemplate extends TApplicationComponent implements ITemplate
{
/**
- * '<!.*?!>' - template comments
+ * '<!--.*?--!>' - template comments
* '<!--.*?-->' - HTML comments
* '<\/?com:([\w\.]+)((?:\s*[\w\.]+=\'.*?\'|\s*[\w\.]+=".*?"|\s*[\w\.]+=<%.*?%>)*)\s*\/?>' - component tags
* '<\/?prop:([\w\.]+)\s*>' - property tags
@@ -638,17 +638,17 @@ class TTemplate extends TApplicationComponent implements ITemplate
$expectPropEnd=false;
}
}
- else if(strpos($str,'<!--')===0) // HTML comments
+ else if(strpos($str,'<!--')===0) // comments
{
- // do nothing
- }
- else if(strpos($str,'<!')===0) // 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;
+ if(strrpos($str,'--!>')===strlen($str)-4) // 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
}
else
throw new TConfigurationException('template_matching_unexpected',$match);