From d036db73e12ee8e2d4bdaad6dbc019caee3c02e3 Mon Sep 17 00:00:00 2001 From: "Md. Rayhan Chowdhury" Date: Tue, 7 Dec 2010 04:32:01 -0800 Subject: [PATCH] method parseString: regex updated to support Like query in blocks, Now single quote and double quote are treated separately. Example: [node:recent_news conditions='Node.type:blog; Node.terms LIKE:%"news"%' order="Node.id DESC" limit="5"] --- controllers/components/croogo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controllers/components/croogo.php b/controllers/components/croogo.php index 6744d5cea7..b6a92ac3aa 100644 --- a/controllers/components/croogo.php +++ b/controllers/components/croogo.php @@ -642,7 +642,7 @@ public function parseString($exp, $text, $options = array()) { $output = array(); preg_match_all('/\[('.$exp.'):([A-Za-z0-9_\-]*)(.*?)\]/i', $text, $tagMatches); for ($i=0; $i < count($tagMatches[1]); $i++) { - $regex = '/(\S+)=[\'"]?((?:.(?![\'"]?\s+(?:\S+)=|[>\'"]))+.)[\'"]?/i'; + $regex = '/(\S+)=([\'"])?((?:.(?!\2?\s+(?:\S+)=|[>\2]))+.)\2?/i'; preg_match_all($regex, $tagMatches[3][$i], $attributes); $alias = $tagMatches[2][$i]; $aliasOptions = array();