diff options
author | xue <> | 2007-01-05 01:29:55 +0000 |
---|---|---|
committer | xue <> | 2007-01-05 01:29:55 +0000 |
commit | 6c2a7b9b5674c5c9f0c8e78e32531af43462638c (patch) | |
tree | b0b649fa34fce11680b82c91f3daaf00fdb1e3a3 | |
parent | dd028bec3822d1d9c28c35d599d687e038c7705f (diff) |
fixed #489.
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | framework/Web/UI/TTemplateManager.php | 16 |
2 files changed, 7 insertions, 10 deletions
@@ -6,6 +6,7 @@ ENH: Ticket#117 - added support to configure subproperties in a group. (Qiang) ENH: Ticket#180, #222 - Prado js files are not rendered at the beginning of the form (Qiang) CHG: All validators ClientSide.OnSuccess becomes ClientSide.OnValidationSuccess, and OnSuccess event becomes OnValidationSuccess. (Wei) CHG: All validators ClientSide.OnError becomes ClientSide.OnValidationError, and OnError event becomes OnValidationError. (Wei) +CHG: Ticket#489 - Contents enclosed within HTML comment tags will now be parsed also (Qiang) NEW: Ajax support and active controls (Wei) NEW: Data abstraction layer based on PDO (Qiang) NEW: SQLMap (Wei) 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
* '<prop:([\w\.]+)((?:\s*[\w\.]+=\'.*?\'|\s*[\w\.]+=".*?"|\s*[\w\.]+=<%.*?%>)*)\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*%>|<%[%#~\\$=\\[](.*?)%>|<prop:([\w\.]+)((?:\s*[\w\.]+\s*=\s*\'.*?\'|\s*[\w\.]+\s*=\s*".*?"|\s*[\w\.]+\s*=\s*<%.*?%>)*)\s*\/>/msS';
+ 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*%>|<%[%#~\\$=\\[](.*?)%>|<prop:([\w\.]+)((?:\s*[\w\.]+\s*=\s*\'.*?\'|\s*[\w\.]+\s*=\s*".*?"|\s*[\w\.]+\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,'<!--')===0) // comments
{
- if(substr($str,-4,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
+ 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);
|