cvs: smarty / NEWS /libs Smarty_Compiler.class.php
[email protected] ("boots") Thu, 25 May 2006 14:46:18 -0000
| Newsgroups | php.smarty.cvs |
|---|---|
| Message-ID | <cvsboots1148568378@cvsserver> |
boots Thu May 25 14:46:18 2006 UTC
Modified files:
/smarty NEWS
/smarty/libs Smarty_Compiler.class.php
Log:
un-hide hidden xml open tags
http://cvs.php.net/viewcvs.cgi/smarty/NEWS?r1=1.530&r2=1.531&diff_format=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.530 smarty/NEWS:1.531
--- smarty/NEWS:1.530 Tue May 9 19:57:30 2006
+++ smarty/NEWS Thu May 25 14:46:18 2006
@@ -1,4 +1,4 @@
-- separate handling of comment blocks from 'special blocks' (boots)
+- un-hide hidden xml open tags (boots)
- fix handling of block-methods of registered objects (El Hombre Gris,
messju)
http://cvs.php.net/viewcvs.cgi/smarty/libs/Smarty_Compiler.class.php?r1=1.380&r2=1.381&diff_format=u
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.380 smarty/libs/Smarty_Compiler.class.php:1.381
--- smarty/libs/Smarty_Compiler.class.php:1.380 Tue May 9 19:57:30 2006
+++ smarty/libs/Smarty_Compiler.class.php Thu May 25 14:46:18 2006
@@ -26,7 +26,7 @@
* @package Smarty
*/
-/* $Id: Smarty_Compiler.class.php,v 1.380 2006/05/09 19:57:30 boots Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.381 2006/05/25 14:46:18 boots Exp $ */
/**
* Template compiling class
@@ -240,8 +240,8 @@
$ldq = preg_quote($this->left_delimiter, '~');
$rdq = preg_quote($this->right_delimiter, '~');
- /* kill comments */
- $source_content = preg_replace("~{$ldq}\*(.*?)\*{$rdq}~", '', $source_content);
+ /* un-hide hidden xml open tags */
+ $source_content = preg_replace("~<({$ldq}(.*?){$rdq})[?]~s", '< \\1', $source_content);
// run template source through prefilter functions
if (count($this->_plugins['prefilter']) > 0) {
@@ -258,7 +258,7 @@
}
/* fetch all special blocks */
- $search = "~{$ldq}\s*literal\s*{$rdq}(.*?){$ldq}\s*/literal\s*{$rdq}|{$ldq}\s*php\s*{$rdq}(.*?){$ldq}\s*/php\s*{$rdq}~s";
+ $search = "~{$ldq}\*(.*?)\*{$rdq}|{$ldq}\s*literal\s*{$rdq}(.*?){$ldq}\s*/literal\s*{$rdq}|{$ldq}\s*php\s*{$rdq}(.*?){$ldq}\s*/php\s*{$rdq}~s";
preg_match_all($search, $source_content, $match, PREG_SET_ORDER);
$this->_folded_blocks = $match;