SWFObject inline javascript unescaped
| Project: | SWF Tools |
| Version: | 5.x-2.4 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
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...)
| Attachment | Size |
|---|---|
| swfobject_w3c.patch | 459 bytes |

#1
... And here's the same patch for 6.x-2.5, since it only differs by one line number.
#2
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?