From f14ecff9bdd949b2aa3ea4f8e041f3366896d93d Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Wed, 22 Oct 2008 22:52:29 +0000 Subject: Fixed a bug in which the parser was being greedy if multiple identical sets of tags were enountered --- system/libraries/Parser.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/libraries/Parser.php b/system/libraries/Parser.php index 011d9598a..e276a0d07 100644 --- a/system/libraries/Parser.php +++ b/system/libraries/Parser.php @@ -158,7 +158,7 @@ class CI_Parser { */ function _match_pair($string, $variable) { - if ( ! preg_match("|".$this->l_delim . $variable . $this->r_delim."(.+)".$this->l_delim . '/' . $variable . $this->r_delim."|s", $string, $match)) + if ( ! preg_match("|".$this->l_delim . $variable . $this->r_delim."(.+?)".$this->l_delim . '/' . $variable . $this->r_delim."|s", $string, $match)) { return FALSE; } -- cgit v1.2.3-24-g4f1b