diff options
author | Pim van den Berg | 2014-03-23 00:23:29 +0100 |
---|---|---|
committer | Pim van den Berg | 2014-03-23 00:23:29 +0100 |
commit | 72ee290477e43d5c1c9107f7aeeea5657e12a703 (patch) | |
tree | e746f4ed86d6a7d67e91e33bb787b7c6438f6331 /type | |
parent | type/Default: escape brackets in identifier before glob (diff) | |
download | apt-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.php | 2 |
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 | ||