Added exact term escaping and fixed breaking exact term behaviour #4186

Closed
opened 2026-02-05 08:12:51 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @Civlac on GitHub (Sep 12, 2023).

Describe the Bug

Wrapping text in "double quotes" in the Advanced Search -> Search Terms field correctly identifies the user input styled as 'exact matches', but doesn't remove the double quotes when moving it to the other field. This causes 0 results to be shown.

Steps to Reproduce

  1. Go to the search page.
  2. On the left 'Search Terms' field, enter text surrounded by double quotes.
  3. It appears to detect this entry as Exact Search, so it moves the user input to that field, but it doesn't return any search results because the double quotes still exist.

Additionally, doubling quotes in the global search at the top of the page will cause the site to timeout, and return a 500 error after 30s.

Expected Behaviour

If the website will auto detect the user input as an 'exact search', the double quotes should be removed.

Screenshots or Additional Context

Before searching:

image

After searching:

image

Note in the global search at the top, the double quotes are duplicated.

Browser Details

Microsoft Edge v116.0.1938.69 on Windows 10 (64 bit)

Exact BookStack Version

v23.08.2

Originally created by @Civlac on GitHub (Sep 12, 2023). ### Describe the Bug Wrapping text in "double quotes" in the Advanced Search -> Search Terms field correctly identifies the user input styled as 'exact matches', but doesn't remove the double quotes when moving it to the other field. This causes 0 results to be shown. ### Steps to Reproduce 1. Go to the search page. 2. On the left 'Search Terms' field, enter text surrounded by double quotes. 3. It appears to detect this entry as Exact Search, so it moves the user input to that field, but it doesn't return any search results because the double quotes still exist. Additionally, doubling quotes in the global search at the top of the page will cause the site to timeout, and return a 500 error after 30s. ### Expected Behaviour If the website will auto detect the user input as an 'exact search', the double quotes should be removed. ### Screenshots or Additional Context #### Before searching: ![image](https://github.com/BookStackApp/BookStack/assets/42948607/f2d28d6d-1425-44ab-877e-dafab68c0453) #### After searching: ![image](https://github.com/BookStackApp/BookStack/assets/42948607/83fef8ce-595d-4162-8fe9-3ad821640123) Note in the global search at the top, the double quotes are duplicated. ### Browser Details Microsoft Edge v116.0.1938.69 on Windows 10 (64 bit) ### Exact BookStack Version v23.08.2
OVERLORD added the 🐛 Bug📖 Docs Update labels 2026-02-05 08:12:51 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4186