aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/type
diff options
context:
space:
mode:
authorPim van den Berg2014-03-23 00:23:29 +0100
committerPim van den Berg2014-03-23 00:23:29 +0100
commit72ee290477e43d5c1c9107f7aeeea5657e12a703 (patch)
treee746f4ed86d6a7d67e91e33bb787b7c6438f6331 /type
parenttype/Default: escape brackets in identifier before glob (diff)
downloadapt-panopticon_cgp-72ee290477e43d5c1c9107f7aeeea5657e12a703.zip
apt-panopticon_cgp-72ee290477e43d5c1c9107f7aeeea5657e12a703.tar.gz
apt-panopticon_cgp-72ee290477e43d5c1c9107f7aeeea5657e12a703.tar.bz2
apt-panopticon_cgp-72ee290477e43d5c1c9107f7aeeea5657e12a703.tar.xz
type/Default: also escape * and ? in identifier before glob
Diffstat (limited to 'type')
-rw-r--r--type/Default.class.php2
1 files changed, 1 insertions, 1 deletions
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 {
159 $this->args['type'], 159 $this->args['type'],
160 strlen($this->args['tinstance']) ? '-' : '', $this->args['tinstance'] 160 strlen($this->args['tinstance']) ? '-' : '', $this->args['tinstance']
161 ); 161 );
162 $identifier = str_replace(array('[', ']'), array('\[', '\]'), $identifier); 162 $identifier = preg_replace("/([*?[])/", '[$1]', $identifier);
163 163
164 $wildcard = strlen($this->args['tinstance']) ? '.' : '[-.]*'; 164 $wildcard = strlen($this->args['tinstance']) ? '.' : '[-.]*';
165 165