diff --git a/internal/web/uploads_badinput_handler_test.go b/internal/web/uploads_badinput_handler_test.go index 6cb594f..566fc8c 100644 --- a/internal/web/uploads_badinput_handler_test.go +++ b/internal/web/uploads_badinput_handler_test.go @@ -99,10 +99,11 @@ func TestUploadPost_BidirectionalControlCharactersAreStrippedFromATitle(t *testi func TestUploadPost_SwedishLettersAndEmojiSurviveTheTitleCleaning(t *testing.T) { app, sub := newUploadApp(t, audioOK, 200<<20) - rec := do(t, app, uploadReq(t, "Möte åäö 🎙️", "a.m4a", []byte("x"))) + // Includes a ZWJ sequence (woman + ZWJ + laptop) and a ZWNJ: joiners are not direction controls. + rec := do(t, app, uploadReq(t, "Möte åäö 🎙️ 👩\u200d💻 a\u200cb", "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)) - assert.Equal(t, "Möte åäö 🎙️", title) + assert.Equal(t, "Möte åäö 🎙️ 👩\u200d💻 a\u200cb", title, "joiners and variation selectors belong to the text") }