Skip to content

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

@RastoHu

Description

@RastoHu

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.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions