简体   繁体   中英

C# Webbrowser remove dots fron url

I have a C# WebBrowser object in my app, but when I make it navigate to a url containing a dot somewhere in the path it just removes the dot.. For example: if I tell it to navigate to this url: http://example.com/hello-./page.html It will navigate to this: url: http://example.com/hello-/page.html

This behavior is because of a known issue with the System.Uri class. I'm not aware of a workaround in code, which means you'll need to point to a different URL (maybe one which redirects to your desired URL?), one which doesn't have a . before the / .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM