ActiveX Content in a local web page, and “the mark of the web”

前端 未结 2 1716
萌比男神i
萌比男神i 2021-01-12 00:32

I\'m trying to make a webpage that people will run from their hard drives, locally, and this page will show a .wmv video (which is also stored locally), using Windows Media

2条回答
  •  甜味超标
    2021-01-12 01:06

    I've been trying for a while to make it work, and it just didn't. I still get the warning bar.

    The usual cause of frustration here is that the Mark Of The Web includes a trailing newline. That newline must be present. And it must be a Windows newline: CR followed by LF. If you edit your file in a sensible text editor that defaults to saving with normal LF newlines, your MOTW will mysteriously not work.

    The MOTW is at the very very beginning of the file, and in string literal terms would look like:

    "\x0D\x0A"
    

    Microsoft have not done a good job of documenting this at all.

提交回复
热议问题