Skip to content

Commit c38b76a

Browse files
authored
[release/7.0] [wasm][debugger] Don't escape accented letters (#78217)
* Don't need to escape special characters anymore * backporting 78320 * Fix characters * Removing unit tests. * remove unused code.
1 parent 404246b commit c38b76a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/mono/wasm/debugger/BrowserDebugProxy/DebugStore.cs

+4-5
Original file line numberDiff line numberDiff line change
@@ -1207,11 +1207,9 @@ private static string EscapeAscii(string path)
12071207
{
12081208
switch (c)
12091209
{
1210-
case var _ when c >= 'a' && c <= 'z':
1211-
case var _ when c >= 'A' && c <= 'Z':
1212-
case var _ when char.IsDigit(c):
1210+
case var _ when char.IsLetterOrDigit(c):
12131211
case var _ when c > 255:
1214-
case var _ when c == '+' || c == ':' || c == '.' || c == '-' || c == '_' || c == '~':
1212+
case var _ when c == '+' || c == ':' || c == '.' || c == '-' || c == '_' || c == '~' || c == '´' || c == '`' || c == '^' || c == '¨':
12151213
builder.Append(c);
12161214
break;
12171215
case var _ when c == Path.DirectorySeparatorChar:
@@ -1220,13 +1218,14 @@ private static string EscapeAscii(string path)
12201218
builder.Append(c);
12211219
break;
12221220
default:
1223-
builder.Append(string.Format($"%{((int)c):X2}"));
1221+
builder.AppendFormat("%{0:X2}", (int)c);
12241222
break;
12251223
}
12261224
}
12271225
return builder.ToString();
12281226
}
12291227

1228+
12301229
internal void AddMethod(MethodInfo mi)
12311230
{
12321231
if (!this.methods.ContainsKey(mi.Token))

src/mono/wasm/debugger/DebuggerTestSuite/MiscTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -964,7 +964,7 @@ await EvaluateAndCheck(
964964
"dotnet://debugger-test-special-char-in-path.dll/test#.cs")]
965965
[InlineData(
966966
"DebuggerTests.CheckSNonAsciiCharactersInPath",
967-
"dotnet://debugger-test-special-char-in-path.dll/non-ascii-test-ął.cs")]
967+
"dotnet://debugger-test-special-char-in-path.dll/non-ascii-test-ąłÅ.cs")]
968968
public async Task SetBreakpointInProjectWithSpecialCharactersInPath(
969969
string classWithNamespace, string expectedFileLocation)
970970
{

0 commit comments

Comments
 (0)