Skip to content

Commit dfe30bc

Browse files
committed
Unescape relative path before accessing file provider
The relative path was URL-encoded, which caused file lookups to fail for paths containing spaces or other special characters. Unescaping the path resolves the issue.
1 parent 336519c commit dfe30bc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Components/WebView/WebView/src/StaticContentProvider.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public bool TryGetResponseContent(string requestUri, bool allowFallbackOnHostPag
2727
{
2828
var relativePath = _appBaseUri.MakeRelativeUri(fileUri).ToString();
2929

30+
relativePath = Uri.UnescapeDataString(relativePath);
31+
3032
// Content in the file provider takes first priority
3133
// Next we may fall back on supplying the host page to support deep linking
3234
// If there's no match, fall back on serving embedded framework content

0 commit comments

Comments
 (0)