Files
outline/server/models
Tom Moor 5b7a5d751c Fix: Properly escape backslashes in search queries (#9297)
* 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>
2025-05-24 11:30:00 -04:00
..
2025-05-03 19:40:18 -04:00
2024-05-24 05:29:00 -07:00
2025-05-03 19:40:18 -04:00
2025-03-29 06:08:07 -07:00
2025-03-29 06:08:07 -07:00
2025-05-03 19:40:18 -04:00