HTML parsing issue in Windows 10 Edge browser

We generate an html file for displaying swf in browsers. Below is our html code:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- saved from url=(0021)http://www.domain_name.com -->
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta name="Keywords" content="xxxxx">
    <meta name="Description" content="">
    <title>test</title> // Title Of The HTML
    <link rel="image_src" href="edge05_thumb.png"> 
    <link rel="viewlet" href="edge05.swf"> // SWF 
    <script language="javascript" type="text/javascript">
        <!--
            document.onhelp=new Function("return false");
            window.onhelp=new Function("return false");
        // -->
    </script>
...
</html>

This code works in all other browsers, but Edge displays a white screen. From my analysis, I found that whenever I delete a comment in the second line (saved from url=(0021)http://www.domain_name.com), it works fine.

I tried to add a comment in html but that did not work.

+4
source share
1 answer

I am sure this is related to your // at the end of the comment.

Replace this:

<script language="javascript" type="text/javascript">
    <!--
        document.onhelp=new Function("return false");
        window.onhelp=new Function("return false");
    // -->
</script>

Thus:

<script language="javascript" type="text/javascript">
     <!--
          document.onhelp=new Function("return false");
           window.onhelp=new Function("return false");
     -->
</script>
0
source

Source: https://habr.com/ru/post/1614833/


All Articles