The javascript code generated by _swfobject_header_js in swfobject.module does not correctly hide itself from non-javascript browsers, causing it to fail W3C validation.

Inline script blocks should begin with <!-- and end with // --> (on a line by itself); these lines of code are ignored by javascript but work with the natural HTML commenting syntax (<!-- comment -->) to conceal javascript code from non-script browsers. SWFTools' inline JS code generally seems to omit these lines, causing potential difficulties with non-scripted browsers.

Find attached a pseudo-patch to amend this in the swfobject.module for 5.x-2.4 - I believe there are a few others instances around the project.

(Patch generated by duplicating the file on my desktop, modifying it, and using the "Compare" function in Komodo Edit - I'm told it's the right syntax but am aware that it references the wrong files...)

CommentFileSizeAuthor
#1 swfobject_w3c_6x.patch459 byteskingandy
swfobject_w3c.patch459 byteskingandy
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kingandy’s picture

FileSize
459 bytes

... And here's the same patch for 6.x-2.5, since it only differs by one line number.

byant’s picture

Why when in Firefox 3.0.11, besides my flash content also show this

"<!--[if gte IE 7]>--> <!--<![endif]-->"

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialize correctly.
<!--[if gte IE 7]>--> <!--<![endif]-->"

but in IE it odesn't show up

what's wrong, I use SWFTools 6.x-2.5 (direct embedding) and my themes is waffles?

Stuart Greenfield’s picture

Version: 5.x-2.4 » 6.x-3.x-dev
Status: Active » Needs review

Looking for a different issue, but found this old one.

This is fixed in DRUPAL-6--3 and script is properly wrapped using drupal_get_js().