Skip to content

Commit 3b5947c

Browse files
authored
fix url_search_params to_string for 5C(\) (#984)
1 parent 5be04e1 commit 3b5947c

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

include/ada/character_sets-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ constexpr uint8_t WWW_FORM_URLENCODED_PERCENT_ENCODE[32] = {
470470
// 50 51 52 53 54 55 56 57
471471
0x00 | 0x00 | 0x00 | 0x00 | 0x00 | 0x00 | 0x00 | 0x00,
472472
// 58 59 5A 5B 5C 5D 5E 5F
473-
0x00 | 0x00 | 0x00 | 0x08 | 0x00 | 0x20 | 0x40 | 0x00,
473+
0x00 | 0x00 | 0x00 | 0x08 | 0x10 | 0x20 | 0x40 | 0x00,
474474
// 60 61 62 63 64 65 66 67
475475
0x01 | 0x00 | 0x00 | 0x00 | 0x00 | 0x00 | 0x00 | 0x00,
476476
// 68 69 6A 6B 6C 6D 6E 6F

tests/url_search_params.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,9 @@ TEST(url_search_params, test_character_set) {
412412
// - The userinfo percent-encode set is the path percent-encode set and U+002F
413413
// (/), U+003A (:), U+003B (;), U+003D (=), U+0040 (@), U+005B ([) to U+005E
414414
// (^), inclusive, and U+007C (|).
415-
std::vector<char> unique_keys = {'/', ':', ';', '=', '@', '[', ']', '^', '|',
416-
'$', '&', '+', ',', '!', '\'', ')', '~'};
415+
std::vector<char> unique_keys = {'/', ':', ';', '=', '@', '[',
416+
']', '^', '|', '$', '&', '+',
417+
',', '!', '\'', ')', '~', '\\'};
417418
for (auto& unique_key : unique_keys) {
418419
auto value = "value" + std::string(1, unique_key);
419420
search_params.set("key", value);

0 commit comments

Comments
 (0)