From 6bf13486a31d402f99d5156a4374e182f0c3fd1b Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Fri, 27 Feb 2026 07:56:44 +0000 Subject: [PATCH] Do not crash on & search --- lib/music_library/records.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/music_library/records.ex b/lib/music_library/records.ex index 018b7899..7b3e669c 100644 --- a/lib/music_library/records.ex +++ b/lib/music_library/records.ex @@ -45,7 +45,7 @@ defmodule MusicLibrary.Records do defp fts_escape(term) do # For FTS5, if the term contains special characters, we need to wrap it in double quotes - if String.contains?(term, ["'", " ", "\"", "(", ")", "^", "-", ":", "?", "."]) do + if String.contains?(term, ["'", " ", "\"", "(", ")", "^", "-", ":", "?", ".", "&"]) do # Escape internal double quotes and wrap in double quotes escaped = String.replace(term, "\"", "\"\"") "\"#{escaped}\"*"