MicrosoftEdge / MicrosoftEdge/WebView2Feedback
WebView2 trims relative paths from href definitions
@LiangTheDev is already working on this.
Since Aug 29, 2022.
- Dominant language
- PowerShell
- Stars
- 526
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
Description
href paths which contains relative paths are no working correctly. If href contains definition like "../../SomeFolder/somefile.txt" when user will click on link system is trying to open path over "http://[browsing-file-host](http://browsing-file-host/SomeFolder/somefile.txt". Relative path portion of path is removed. See attached image.
WebView2 is setup with fallowing call
string baseHref = Path.GetDirectoryName(_file).Replace("\", "/");
_browser.CoreWebView2.SetVirtualHostNameToFolderMapping(_mappedBrowsingFileVirtualHostName, baseHref, CoreWebView2HostResourceAccessKind.Allow);
where baseHref is pointing to correct root for relative paths,
Version
SDK:
Runtime:
Framework:
OS:
Repro Steps
Screenshots
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.