issues: 781262510

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association pull_request body repo type active_lock_reason performed_via_github_app
781262510 MDU6SXNzdWU3ODEyNjI1MTA= 1181 Certain database names results in 404: "Database not found: None" 1470389 open 0     3 2021-01-07T12:01:16Z 2021-01-17T00:24:40Z   NONE  

I have a file named test-database (1).sqlite. When requesting the home route /, I see datasette is able to read it correctly:
https://user-images.githubusercontent.com/1470389/103889964-9442b800-50e7-11eb-9548-fbf10ed3b1ea.png">

However, if I click any of the links, datasette replies with: Error 404 Database not found: None

It seems the hash is crucial, as renaming the file to database (1).sqlite makes the error go away.

This lines checks for a single dash:
https://github.com/simonw/datasette/blob/97fb10c17dd007a275ab743742e93e932335ad67/datasette/views/base.py#L184

$ datasette test-database\ \(1\).sqlite 
INFO:     Started server process [68314]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8001 (Press CTRL+C to quit)
INFO:     127.0.0.1:54043 - "GET /favicon.ico HTTP/1.1" 200 OK
INFO:     127.0.0.1:54043 - "GET / HTTP/1.1" 200 OK
...
INFO:     127.0.0.1:54044 - "GET /favicon.ico HTTP/1.1" 200 OK
INFO:     127.0.0.1:54044 - "GET /test-database (1) HTTP/1.1" 404 Not Found

Version:

$ datasette --version
datasette, version 0.53
107914493 issue    

Links from other tables