From 523c6f9e3a2cb9a9b5627ee2951147110e91d499 Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sun, 19 Nov 2017 21:59:53 -0800 Subject: [PATCH] Fixed bug with FTS against tables with hyphens in the name --- datasette/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasette/app.py b/datasette/app.py index fc1e8dfd..890c8cec 100644 --- a/datasette/app.py +++ b/datasette/app.py @@ -456,7 +456,7 @@ class TableView(BaseView): search = special_args.get('_search') if search and fts_table: where_clauses.append( - 'rowid in (select rowid from {fts_table} where {fts_table} match :search)'.format( + 'rowid in (select rowid from [{fts_table}] where [{fts_table}] match :search)'.format( fts_table=fts_table ) )