#1985·zeal

Searches no longer support wildcard characters

Author: iforapsyCreated Sep 16, 2026Updated Sep 16, 2026

SQL wildcard characters (i.e. % and _) typed into the search box no longer work as wildcards. For example, searching for "argparse.A_g%Parser` previously matched "argparse.ArgumentParser" but no longer returns any results. This seems to be a regression.

Steps to reproduce

  1. Open Zeal with any docset installed (fuzzy search disabled). Let's use the Python 3 docset as an example.
  2. Type a query containing % or _, e.g. "argparse.A_g%Parser", into the search box on the top left.

Expected behavior

A doc page named "argparse.ArgumentParser" is in the search hits.

% and _ in the search query act as SQL LIKE wildcards, as they did in earlier versions. % matches any sequence of characters, similar to "*" in filename globs. _ matches any single character, similar to "?" in filename globs.

Actual behavior

No results are returned, even though a page named "argparse.ArgumentParser" exists in the Python 3 docset.

% and _ are now treated as literal characters to match, so wildcard patterns never match anything (unless the docset happens to contain that literal substring).

Root cause

This is a side effect of commit 2358d5e1e from #1852. That switched Docset::search() from unsafe string interpolation (sql.arg(...)) to parameterized queries via stmt.bindText() to harden against SQL injections.

However, that change also introduced Util::escapeLikePattern() (src/libs/util/statement.cpp:121-132), which backslash-escapes %, _, and \ in the *raw user query* before it's wrapped in %...% and bound into the LIKE ? ESCAPE '\\' clause in Docset::search(). Now every user-typed %/_ is forced to match literally, removing the wildcard search capability. This only affects non-fuzzy search — fuzzy search uses a custom zealScore() function and is unaffected.

Version

Introduced in v0.9.0 (via commit 2358d5e1e, merged 2026-05-09). This was working correctly in v0.8.1 and earlier.