MerginMaps / MerginMaps/mobile

Text filter: % and _ treated as SQL wildcards instead of literal characters

Open
#4,517 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug filtering Good first issue
Dominant language
C++
Stars
388
Forks
87
Avg merge
2d 7h
Merged PRs (30d)
20

Description

Description

When entering % or _ into a text filter input in the mobile app, all features are returned instead of treating these characters as literals. Both % and _ are SQL wildcard characters and must be escaped before being used in a filter query — they should match only features whose field value literally contains % or _, not act as wildcards returning everything.

Environment
[ ] Staging [x] PROD

Application (+ app version, build, operating system)
Mergin Maps iOS 2026.2.0, iOS 26.0

Steps to reproduce

  1. Open project tester-ws-1/preview_mode_bug
  2. Navigate to the filter page
  3. Open a text filter (e.g. Text-POI-notes) → enter % → apply
  4. Reset filter → open the same text filter → enter _ → apply

Actual results
All features with non empty "notes" field are returned for both % and _ — the characters are interpreted as SQL wildcards (% = any string, _ = any single character).

Expected results
% and _ should be treated as literal characters. Only features whose field value literally contains % or _ should be returned. They must not act as SQL wildcards.

Screenshots or logs

Conclusion
Created by Claude and supervised by a human test analyst.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in the mobile app using the tester-ws-1/preview_mode_bug project and the Text-POI-notes filter, then trace how text-filter input becomes the SQL query. Check handling for % and _; done means both characters match only literal occurrences rather than acting as wildcards.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.