# Bug OP-7220 - Underscore is treated as wildcard in search filter

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-7220

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 13.2.1 |
| Observed in versions | 10.5.0 |
| Sprint | 13.2.1 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 10.5.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### **Environment**:

Your OpenProject Version: 10.5.1

Operating System / Browser / Language:  
Linux (Fedora 32) / Firefox 76, Chromium / PL

### **Logs**

No errors in openproject logs

### **Steps to reproduce:**

1.  Create package that contains string foobar.
2.  Search for fo\_bar

### **Actual Behavior**

The underscore is treated as a wildcard and matches the string "foobar"

### **Expected Behavior**

The string should not match

Original report, which is similar but not actually a bug:

> ### **Steps to reproduce:**
> 
> 1.  Create package that contains string with underscore in description ie.: c\_tree\_h . Save package.
> 2.  Search c\_tree\_h in search form on top of page
> 
> ### **Actual Behavior**
> 
> There is no matches for searching string 'c\_tree\_\_h\_'. But there are matches for 'tree', so searching is working.
> 
> ### **Expected Behavior**
> 
> Matches with search string containing underscores
