diff --git a/datasette/app.py b/datasette/app.py
index 3ff5267e..e4475a85 100644
--- a/datasette/app.py
+++ b/datasette/app.py
@@ -626,7 +626,7 @@ class TableView(BaseView):
other_table, label = expanded[(column, value)]
display_value = jinja2.Markup(
# TODO: Escape id/label/etc so no XSS here
- '{label} {id}'.format(
+ '{label} {id}'.format(
database=database,
database_hash=database_hash,
table=escape_sqlite_table_name(other_table),