fabriciocs / swfobject

Automatically exported from code.google.com/p/swfobject
0 stars 0 forks source link

Generated xhtml code is not valid #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run example
2. validation after JS execution

What is the expected output? What do you see instead?

Expected
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<html>
<head><title>HTML Body after JavaScript execution</title></head>
<body>

        <div>   
            <object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
height="120" width="300">
                <param name="movie" value="test6.swf" />
                    <!--[if !IE]>-->
                <object type="application/x-shockwave-flash" data="test6.swf"
height="120" width="300">
                <!--<![endif]-->

                <div>
                    <h1>Alternative content</h1>
                    <p><a href="http://www.adobe.com/go/getflashplayer"><img
src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
alt="Get Adobe Flash player" /></a></p>
                </div>
                <!--[if !IE]>-->
                </object>
                <!--<![endif]-->
            </object>

        </div>
    </body>
</html>

I see:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN">
<html>
<head><title>HTML Body after JavaScript execution</title></head>
<body>

        <div>   
            <object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
height="120" width="300">
                <param name="movie" value="test6.swf">
                    <!--[if !IE]>-->
                <object type="application/x-shockwave-flash" data="test6.swf"
height="120" width="300">
                <!--<![endif]-->

                <div>
                    <h1>Alternative content</h1>
                    <p><a href="http://www.adobe.com/go/getflashplayer"><img
src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
alt="Get Adobe Flash player"></a></p>
                </div>
                <!--[if !IE]>-->
                </object>
                <!--<![endif]-->
            </object>

        </div>
    </body>
</html>

What version of the product are you using? On what operating system?

2.0 RC1

Please provide any additional information below.

When i use your script i try valid xhtml code after JS execution. Then
there are not " />". Code is not xhtml valid.

Original issue reported on code.google.com by dry...@gmail.com on 14 Jan 2008 at 5:31

GoogleCodeExporter commented 9 years ago
I suspect you copied over the body of the example into an own HTML template 
with an
invalid DOCTYPE, that's why it doesn't validate. The original html/head looks 
like:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title>SWFObject v2.0 sample page</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
        swfobject.registerObject("myId", "9.0.0", "expressInstall.swf");
        </script>
    </head>
    <body>
                ...

Original comment by bobbyvandersluis on 15 Jan 2008 at 9:11