Skip to content

Commit

Permalink
HTML: test surrogates in form submission
Browse files Browse the repository at this point in the history
  • Loading branch information
annevk authored Apr 3, 2023
1 parent 2335c11 commit 2ef5c37
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,3 +344,14 @@ formTest({
},
description: "character not in encoding in filename",
});

formTest({
name: "\uD800",
value: "\uD800",
formEncoding: "windows-1252",
expected: {
name: "�",
value: "�"
},
description: "lone surrogate in name and value",
});
8 changes: 8 additions & 0 deletions html/semantics/forms/form-submission-0/text-plain.window.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,11 @@ formTest({
expected: "\xE1=💩\r\n",
description: "character not in encoding in filename",
});

formTest({
name: "\uD800",
value: "\uD800",
formEncoding: "windows-1252",
expected: "�=�\r\n",
description: "lone surrogate in name and value",
});
8 changes: 8 additions & 0 deletions html/semantics/forms/form-submission-0/urlencoded2.window.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,11 @@ formTest({
expected: "%E1=%26%23128169%3B",
description: "character not in encoding in filename",
});

formTest({
name: "\uD800",
value: "\uD800",
formEncoding: "windows-1252",
expected: "%26%2365533%3B=%26%2365533%3B",
description: "lone surrogate in name and value",
});

0 comments on commit 2ef5c37

Please sign in to comment.