From 08ffc2ff621da0a9d452ef70cb8ee77bc8d56e49 Mon Sep 17 00:00:00 2001 From: Mathias Date: Fri, 2 Oct 2026 17:23:50 +0200 Subject: [PATCH] test(web): Go escapes for the bidirectional characters, which staticcheck ST1018 requires -- task check does not gate lint (#41) Co-Authored-By: Claude Sonnet 5.5 --- internal/web/uploads_badinput_handler_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/web/uploads_badinput_handler_test.go b/internal/web/uploads_badinput_handler_test.go index 566fc8c..f82b6ac 100644 --- a/internal/web/uploads_badinput_handler_test.go +++ b/internal/web/uploads_badinput_handler_test.go @@ -84,12 +84,12 @@ func TestUploadPost_BidirectionalControlCharactersAreStrippedFromATitle(t *testi // owner's own page (second adversarial review). app, sub := newUploadApp(t, audioOK, 200<<20) - rec := do(t, app, uploadReq(t, "Sprint ‮review ⁦x⁩ ‏ok", "a.m4a", []byte("x"))) + rec := do(t, app, uploadReq(t, "Sprint \u202Ereview \u2066x\u2069 \u200Fok", "a.m4a", []byte("x"))) require.Equal(t, http.StatusSeeOther, rec.Code) var title string require.NoError(t, rawPool(t).QueryRow(context.Background(), `SELECT title FROM uploaded_transcripts WHERE id = $1`, sub.jobs[0].UploadID).Scan(&title)) - for _, r := range []string{"‮", "⁦", "⁩", "‏"} { + for _, r := range []string{"\u202E", "\u2066", "\u2069", "\u200F"} { assert.NotContains(t, title, r) } assert.Contains(t, title, "Sprint")