Fix double escaping in AFPData::keywordLike()

If we don't map '\-' and '\+' to themselves, the leading slash gets escaped,
and the resultant pattern only matches a literal slash.

Bug: 67670
Change-Id: Ifa1e3edd6f41985a3bb97bfb1497985f8fa64af5
This commit is contained in:
Ori Livneh 2014-07-11 14:43:11 -07:00
parent d239ab117f
commit 0e36b728e3
2 changed files with 3 additions and 1 deletions

View file

@ -73,6 +73,8 @@ class AFPData {
// Derived from <http://www.php.net/manual/en/function.fnmatch.php#100207>
private static $wildcardMap = array(
'\*' => '.*',
'\+' => '\+',
'\-' => '\-',
'\.' => '\.',
'\?' => '.',
'\[' => '[',

View file

@ -1 +1 @@
"foobér" like "foob?r" & "quux" matches "qu*x"
"f+oo-bér" like "f+oo-b?r" & "quux" matches "qu*x"