Merge pull request #105130 from bruvzg/uri_fix_plus

Add uri_file_decode to handle + in file names.
This commit is contained in:
Thaddeus Crews 2025-04-09 18:11:56 -05:00
commit 7a6c3b309f
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
13 changed files with 52 additions and 10 deletions

View file

@ -1774,6 +1774,7 @@ TEST_CASE("[String] uri_encode/unescape") {
static const uint8_t u8str[] = { 0x54, 0xC4, 0x93, 0xC5, 0xA1, 0x74, 0x00 };
String x2 = String::utf8((const char *)u8str);
String x3 = U"Tēšt";
String x4 = U"file+name";
CHECK(x1.uri_decode() == x2);
CHECK(x1.uri_decode() == x3);
@ -1783,6 +1784,8 @@ TEST_CASE("[String] uri_encode/unescape") {
CHECK(s.uri_encode() == t);
CHECK(t.uri_decode() == s);
CHECK(x4.uri_file_decode() == x4);
CHECK(x4.uri_decode() == U"file name");
}
TEST_CASE("[String] xml_escape/unescape") {