# HG changeset patch # User Sebastien Jodogne # Date 1751312706 -7200 # Node ID c6ae4244f0759e39431223eccefb189aa160f8ee # Parent 3a974dbf47406042ab02d642c4005a2e66c5f8dd fix Toolbox::UriEncode(): the slash is a reserved character diff -r 3a974dbf4740 -r c6ae4244f075 OrthancFramework/Sources/Toolbox.cpp --- a/OrthancFramework/Sources/Toolbox.cpp Wed Jun 25 15:08:50 2025 +0200 +++ b/OrthancFramework/Sources/Toolbox.cpp Mon Jun 30 21:45:06 2025 +0200 @@ -1482,8 +1482,7 @@ c == '-' || c == '_' || c == '.' || - c == '~' || - c == '/'); + c == '~'); } void Toolbox::UriEncode(std::string& target, diff -r 3a974dbf4740 -r c6ae4244f075 OrthancFramework/UnitTestsSources/FrameworkTests.cpp --- a/OrthancFramework/UnitTestsSources/FrameworkTests.cpp Wed Jun 25 15:08:50 2025 +0200 +++ b/OrthancFramework/UnitTestsSources/FrameworkTests.cpp Mon Jun 30 21:45:06 2025 +0200 @@ -1278,7 +1278,7 @@ Toolbox::UriEncode(s, t); ASSERT_EQ(t, s); - Toolbox::UriEncode(s, "!#$&'()*+,/:;=?@[]"); ASSERT_EQ("%21%23%24%26%27%28%29%2A%2B%2C/%3A%3B%3D%3F%40%5B%5D", s); + Toolbox::UriEncode(s, "!#$&'()*+,/:;=?@[]"); ASSERT_EQ("%21%23%24%26%27%28%29%2A%2B%2C%2F%3A%3B%3D%3F%40%5B%5D", s); Toolbox::UriEncode(s, "%"); ASSERT_EQ("%25", s); // Encode characters from UTF-8. This is the test string from the