cvs: smarty / NEWS /libs Smarty_Compiler.class.php
"Messju Mohr" <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <cvsmessju1123184602@cvsserver> |
messju Thu Aug 4 15:43:22 2005 EDT
Modified files:
/smarty NEWS
/smarty/libs Smarty_Compiler.class.php
Log:
fixed proper escaping for literal strings passed to
Smarty_Compiler::_expand_quoted_text() by
Smarty_Compiler::_parse_var_props()
http://cvs.php.net/diff.php/smarty/NEWS?r1=1.506&r2=1.507&ty=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.506 smarty/NEWS:1.507
--- smarty/NEWS:1.506 Wed Jul 27 16:54:24 2005
+++ smarty/NEWS Thu Aug 4 15:43:19 2005
@@ -1,3 +1,5 @@
+ - fix proper escaping for literal strings in
+ Smarty_Compiler::_parse_var_props() (boots, messju)
- remove ambiguity for numeric values passed to smarty_make_timestamp()
(and thus the date_format modifier). numeric values are treated as
timestamps now. (andreas, messju)
http://cvs.php.net/diff.php/smarty/libs/Smarty_Compiler.class.php?r1=1.369&r2=1.370&ty=u
Index: smarty/libs/Smarty_Compiler.class.php
diff -u smarty/libs/Smarty_Compiler.class.php:1.369 smarty/libs/Smarty_Compiler.class.php:1.370
--- smarty/libs/Smarty_Compiler.class.php:1.369 Mon May 2 10:03:18 2005
+++ smarty/libs/Smarty_Compiler.class.php Thu Aug 4 15:43:21 2005
@@ -26,7 +26,7 @@
* @package Smarty
*/
-/* $Id: Smarty_Compiler.class.php,v 1.369 2005/05/02 14:03:18 mohrt Exp $ */
+/* $Id: Smarty_Compiler.class.php,v 1.370 2005/08/04 19:43:21 messju Exp $ */
/**
* Template compiling class
@@ -1650,7 +1650,7 @@
}
elseif(!in_array($val, $this->_permitted_tokens) && !is_numeric($val)) {
// literal string
- return $this->_expand_quoted_text('"' . $val .'"');
+ return $this->_expand_quoted_text('"' . strtr($val, array('\\' => '\\\\', '"' => '\\"')) .'"');
}
return $val;
}
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php