11cb0ef41Sopenharmony_ci<!DOCTYPE html> 21cb0ef41Sopenharmony_ci<meta charset="utf-8" /> 31cb0ef41Sopenharmony_ci<title>FormData: Upload files named using punctuation (tentative)</title> 41cb0ef41Sopenharmony_ci<!-- 51cb0ef41Sopenharmony_ci NOTE: This test is tentative because encoding for filename 61cb0ef41Sopenharmony_ci punctuation characters is not yet standardized. 71cb0ef41Sopenharmony_ci --> 81cb0ef41Sopenharmony_ci<link 91cb0ef41Sopenharmony_ci rel="help" 101cb0ef41Sopenharmony_ci href="https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#multipart-form-data" 111cb0ef41Sopenharmony_ci/> 121cb0ef41Sopenharmony_ci<link 131cb0ef41Sopenharmony_ci rel="help" 141cb0ef41Sopenharmony_ci href="https://html.spec.whatwg.org/multipage/dnd.html#datatransferitemlist" 151cb0ef41Sopenharmony_ci/> 161cb0ef41Sopenharmony_ci<link rel="help" href="https://w3c.github.io/FileAPI/#file-constructor" /> 171cb0ef41Sopenharmony_ci<link 181cb0ef41Sopenharmony_ci rel="author" 191cb0ef41Sopenharmony_ci title="Benjamin C. Wiley Sittler" 201cb0ef41Sopenharmony_ci href="mailto:bsittler@chromium.org" 211cb0ef41Sopenharmony_ci/> 221cb0ef41Sopenharmony_ci<script src="/resources/testharness.js"></script> 231cb0ef41Sopenharmony_ci<script src="/resources/testharnessreport.js"></script> 241cb0ef41Sopenharmony_ci<script src="../support/send-file-formdata-helper.js"></script> 251cb0ef41Sopenharmony_ci<script> 261cb0ef41Sopenharmony_ci "use strict"; 271cb0ef41Sopenharmony_ci 281cb0ef41Sopenharmony_ci // These have characters that undergo processing in name=, 291cb0ef41Sopenharmony_ci // filename=, and/or value; formDataPostFileUploadTest postprocesses 301cb0ef41Sopenharmony_ci // expectedEncodedBaseName for these internally. 311cb0ef41Sopenharmony_ci 321cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 331cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 341cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-QUOTATION-MARK-[\x22].txt", 351cb0ef41Sopenharmony_ci }); 361cb0ef41Sopenharmony_ci 371cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 381cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 391cb0ef41Sopenharmony_ci fileBaseName: '"file-for-upload-in-form-double-quoted.txt"', 401cb0ef41Sopenharmony_ci }); 411cb0ef41Sopenharmony_ci 421cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 431cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 441cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-REVERSE-SOLIDUS-[\\].txt", 451cb0ef41Sopenharmony_ci }); 461cb0ef41Sopenharmony_ci 471cb0ef41Sopenharmony_ci // The rest should be passed through unmodified: 481cb0ef41Sopenharmony_ci 491cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 501cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 511cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-EXCLAMATION-MARK-[!].txt", 521cb0ef41Sopenharmony_ci }); 531cb0ef41Sopenharmony_ci 541cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 551cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 561cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-DOLLAR-SIGN-[$].txt", 571cb0ef41Sopenharmony_ci }); 581cb0ef41Sopenharmony_ci 591cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 601cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 611cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-PERCENT-SIGN-[%].txt", 621cb0ef41Sopenharmony_ci }); 631cb0ef41Sopenharmony_ci 641cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 651cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 661cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-AMPERSAND-[&].txt", 671cb0ef41Sopenharmony_ci }); 681cb0ef41Sopenharmony_ci 691cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 701cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 711cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-APOSTROPHE-['].txt", 721cb0ef41Sopenharmony_ci }); 731cb0ef41Sopenharmony_ci 741cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 751cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 761cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-LEFT-PARENTHESIS-[(].txt", 771cb0ef41Sopenharmony_ci }); 781cb0ef41Sopenharmony_ci 791cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 801cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 811cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-RIGHT-PARENTHESIS-[)].txt", 821cb0ef41Sopenharmony_ci }); 831cb0ef41Sopenharmony_ci 841cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 851cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 861cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-ASTERISK-[*].txt", 871cb0ef41Sopenharmony_ci }); 881cb0ef41Sopenharmony_ci 891cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 901cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 911cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-PLUS-SIGN-[+].txt", 921cb0ef41Sopenharmony_ci }); 931cb0ef41Sopenharmony_ci 941cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 951cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 961cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-COMMA-[,].txt", 971cb0ef41Sopenharmony_ci }); 981cb0ef41Sopenharmony_ci 991cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1001cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1011cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-FULL-STOP-[.].txt", 1021cb0ef41Sopenharmony_ci }); 1031cb0ef41Sopenharmony_ci 1041cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1051cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1061cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-SOLIDUS-[/].txt", 1071cb0ef41Sopenharmony_ci }); 1081cb0ef41Sopenharmony_ci 1091cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1101cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1111cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-COLON-[:].txt", 1121cb0ef41Sopenharmony_ci }); 1131cb0ef41Sopenharmony_ci 1141cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1151cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1161cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-SEMICOLON-[;].txt", 1171cb0ef41Sopenharmony_ci }); 1181cb0ef41Sopenharmony_ci 1191cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1201cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1211cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-EQUALS-SIGN-[=].txt", 1221cb0ef41Sopenharmony_ci }); 1231cb0ef41Sopenharmony_ci 1241cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1251cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1261cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-QUESTION-MARK-[?].txt", 1271cb0ef41Sopenharmony_ci }); 1281cb0ef41Sopenharmony_ci 1291cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1301cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1311cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-CIRCUMFLEX-ACCENT-[^].txt", 1321cb0ef41Sopenharmony_ci }); 1331cb0ef41Sopenharmony_ci 1341cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1351cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1361cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-LEFT-SQUARE-BRACKET-[[].txt", 1371cb0ef41Sopenharmony_ci }); 1381cb0ef41Sopenharmony_ci 1391cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1401cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1411cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-RIGHT-SQUARE-BRACKET-[]].txt", 1421cb0ef41Sopenharmony_ci }); 1431cb0ef41Sopenharmony_ci 1441cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1451cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1461cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-LEFT-CURLY-BRACKET-[{].txt", 1471cb0ef41Sopenharmony_ci }); 1481cb0ef41Sopenharmony_ci 1491cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1501cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1511cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-VERTICAL-LINE-[|].txt", 1521cb0ef41Sopenharmony_ci }); 1531cb0ef41Sopenharmony_ci 1541cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1551cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1561cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-RIGHT-CURLY-BRACKET-[}].txt", 1571cb0ef41Sopenharmony_ci }); 1581cb0ef41Sopenharmony_ci 1591cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1601cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1611cb0ef41Sopenharmony_ci fileBaseName: "file-for-upload-in-form-TILDE-[~].txt", 1621cb0ef41Sopenharmony_ci }); 1631cb0ef41Sopenharmony_ci 1641cb0ef41Sopenharmony_ci formDataPostFileUploadTest({ 1651cb0ef41Sopenharmony_ci fileNameSource: "ASCII", 1661cb0ef41Sopenharmony_ci fileBaseName: "'file-for-upload-in-form-single-quoted.txt'", 1671cb0ef41Sopenharmony_ci }); 1681cb0ef41Sopenharmony_ci</script> 169