如何在 Pocket PC .NET CF 3.5 的 WebBrowser 中禁用 mailto 弹出窗口?
出于安全原因,当用户单击我的子类 WebBrowser 中查看本地 html 文件的弹出窗口时,我尝试禁用 Outlook(或任何默认邮件客户端)的打开。我尝试将 DocumentText 替换为没有“mailto:”链接引用的版本,但这一直失败(无论我尝试什么,设置 DocumentText 后它都会坚持到 about:blank 页面)。
解决我的问题的最佳解决方案是通过注册表或其他方式完全禁用任何默认邮件客户端,但我愿意接受我尚未尝试过的任何内容。有什么想法吗?
For security reasons, I'm trying to disable the opening of Outlook (or any default mail client) when the user clicks a popup in my subclassed WebBrowser viewing a local html file. I've tried replacing the DocumentText with a version sans the "mailto:" link references, but this has continuously failed (no matter what I try, it keeps sticking to the about:blank page after setting the DocumentText).
The best solution to my problem would be to completely disable any default mail clients, via the registry or other means, but I am open to anything I haven't tried yet. Any ideas?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我能够通过覆盖 html 文件以不包含“mailto”引用来解决我的安全问题。文件替换后,我简单刷新一下:
I was able to fix my security issue by overwriting the html file to contain no "mailto" references. After the file is replaced, I simply refreshed it: