Outpost Community Demo

Search breaks if query contains a single quote

By 0xSarah ·

Tried searching for it's and got a 500 error. Same with what's or anything with an apostrophe.

Searching without the apostrophe works fine (its, whats).

Not sure if this is a frontend or backend issue but the network tab shows the API returning 500.

3 replies

priya.sh ·

Ooh, smells like an unescaped single quote hitting the SQL query. Classic.

top-outpost-ninja ·

Yep, you nailed it Priya. The full-text search query wasn't properly escaping special characters before passing to PostgreSQL's to_tsquery. Fixed now — apostrophes, ampersands, and other special chars are handled correctly.

Thanks for the report!

0xSarah ·

Just tested, works perfectly now. Also tested with other special characters (&, |, !) and those work too. Nice.