mirror of
https://github.com/outline/outline.git
synced 2026-05-12 13:21:17 -05:00
5b7a5d751c
* Fix: Properly escape backslashes in search queries This commit fixes a bug where backslashes in search queries were not properly escaped, leading to database errors. The `escapeQuery` method is now applied to quoted queries and URLs to ensure that all parts of the search query are correctly escaped. A test case has been added to verify that searching with backslashes works as expected. * Fix: Properly escape backslashes in search query URLs This commit fixes a bug where backslashes in URLs within search queries were not properly escaped, leading to database errors. The `escapeQuery` method is now applied to `likelyUrls` before they are used in `iLike` conditions. Quoted queries were found to be already escaped and are no longer double-escaped. The existing test case for searching with backslashes remains relevant for verifying URL escaping. * lint --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>