{"html_url": "https://github.com/simonw/datasette/issues/1439#issuecomment-1065988403", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1439", "id": 1065988403, "node_id": "IC_kwDOBm6k_c4_ibEz", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-13T00:06:38Z", "updated_at": "2022-03-13T00:07:19Z", "author_association": "OWNER", "body": "If I want to reserve `-` as a character that CAN be used in URLs, the only remaining character that might make sense for escape sequences is `~` - based on this last line of characters that are escape from percentage encoding:\r\n\r\n```python\r\n_ALWAYS_SAFE = frozenset(b'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\r\n b'abcdefghijklmnopqrstuvwxyz'\r\n b'0123456789'\r\n b'_.-~')\r\n```\r\nSo I'd add both `-` and `_` back to the safe list, but use `~` to escape `.` and `/` and suchlike.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 973139047, "label": "Rethink how .ext formats (v.s. ?_format=) works before 1.0"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1439#issuecomment-1065987808", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1439", "id": 1065987808, "node_id": "IC_kwDOBm6k_c4_ia7g", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-03-13T00:02:32Z", "updated_at": "2022-03-13T00:02:32Z", "author_association": "OWNER", "body": "OK, this has broken a lot more than I expected it would.\r\n\r\nTurns out `-` is a very common character in existing Datasette database names!\r\n\r\nhttps://datasette.io/-/databases for example has two:\r\n\r\n```json\r\n[\r\n {\r\n \"name\": \"docs-index\",\r\n \"path\": \"docs-index.db\",\r\n \"size\": 1007616,\r\n \"is_mutable\": false,\r\n \"is_memory\": false,\r\n \"hash\": \"0ac6c3de2762fcd174fd249fed8a8fa6046ea345173d22c2766186bf336462b2\"\r\n },\r\n {\r\n \"name\": \"dogsheep-index\",\r\n \"path\": \"dogsheep-index.db\",\r\n \"size\": 5496832,\r\n \"is_mutable\": false,\r\n \"is_memory\": false,\r\n \"hash\": \"d1ea238d204e5b9ae783c86e4af5bcdf21267c1f391de3e468d9665494ee012a\"\r\n }\r\n]\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 973139047, "label": "Rethink how .ext formats (v.s. ?_format=) works before 1.0"}, "performed_via_github_app": null}