Index: clang-tools-extra/trunk/clangd/URI.cpp =================================================================== --- clang-tools-extra/trunk/clangd/URI.cpp +++ clang-tools-extra/trunk/clangd/URI.cpp @@ -79,7 +79,8 @@ bool shouldEscape(unsigned char C) { // Unreserved characters. - if ((C >= 'a' && C <= 'z') || (C >= 'A' && C <= 'Z')) + if ((C >= 'a' && C <= 'z') || (C >= 'A' && C <= 'Z') || + (C >= '0' && C <= '9')) return false; switch (C) { case '-': Index: clang-tools-extra/trunk/unittests/clangd/URITests.cpp =================================================================== --- clang-tools-extra/trunk/unittests/clangd/URITests.cpp +++ clang-tools-extra/trunk/unittests/clangd/URITests.cpp @@ -72,6 +72,7 @@ TEST(PercentEncodingTest, Encode) { EXPECT_EQ(URI("x", /*Authority=*/"", "a/b/c").toString(), "x:a/b/c"); EXPECT_EQ(URI("x", /*Authority=*/"", "a!b;c~").toString(), "x:a%21b%3bc~"); + EXPECT_EQ(URI("x", /*Authority=*/"", "a123b").toString(), "x:a123b"); } TEST(PercentEncodingTest, Decode) {