cvs: smarty /libs/plugins modifier.regex_replace.php
[email protected] ("Monte Ohrt") Wed, 08 Mar 2006 14:37:37 -0000
| Newsgroups | php.smarty.cvs |
|---|---|
| Message-ID | <cvsmohrt1141828657@cvsserver> |
mohrt Wed Mar 8 14:37:37 2006 UTC
Modified files:
/smarty/libs/plugins modifier.regex_replace.php
Log:
remove delim quote
http://cvs.php.net/viewcvs.cgi/smarty/libs/plugins/modifier.regex_replace.php?r1=1.7&r2=1.8&diff_format=u
Index: smarty/libs/plugins/modifier.regex_replace.php
diff -u smarty/libs/plugins/modifier.regex_replace.php:1.7 smarty/libs/plugins/modifier.regex_replace.php:1.8
--- smarty/libs/plugins/modifier.regex_replace.php:1.7 Wed Mar 8 14:13:08 2006
+++ smarty/libs/plugins/modifier.regex_replace.php Wed Mar 8 14:37:37 2006
@@ -22,8 +22,7 @@
*/
function smarty_modifier_regex_replace($string, $search, $replace)
{
- $_delimq = preg_quote($string[0]);
- if (preg_match('!' . $_delimq . '([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
+ if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
/* remove eval-modifier from $search */
$search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
}