SWFObject inline javascript unescaped

kingandy - June 16, 2009 - 09:02
Project:SWF Tools
Version:5.x-2.4
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

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...)

AttachmentSize
swfobject_w3c.patch459 bytes

#1

kingandy - June 16, 2009 - 09:05

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

AttachmentSize
swfobject_w3c_6x.patch 459 bytes

#2

byant - June 20, 2009 - 00:22

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?

 
 

Drupal is a registered trademark of Dries Buytaert.