From 72ee290477e43d5c1c9107f7aeeea5657e12a703 Mon Sep 17 00:00:00 2001 From: Pim van den Berg Date: Sun, 23 Mar 2014 00:23:29 +0100 Subject: type/Default: also escape * and ? in identifier before glob --- type/Default.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'type') diff --git a/type/Default.class.php b/type/Default.class.php index ce47cf3..909ac32 100644 --- a/type/Default.class.php +++ b/type/Default.class.php @@ -159,7 +159,7 @@ class Type_Default { $this->args['type'], strlen($this->args['tinstance']) ? '-' : '', $this->args['tinstance'] ); - $identifier = str_replace(array('[', ']'), array('\[', '\]'), $identifier); + $identifier = preg_replace("/([*?[])/", '[$1]', $identifier); $wildcard = strlen($this->args['tinstance']) ? '.' : '[-.]*'; -- cgit v1.1