diff options
| -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);
  | 
