Embed filter incorrectly closes embed tags, causes broken Youtube embeds in IE.

ragaskar - October 11, 2007 - 02:11
Project:Embed filter
Version:5.x-1.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I'm not positive what the following is supposed to do (and I'm not sure what the author thinks it will do either,):

      // 3 part arrays are single, closed tags: <embed.... />
      else if (count($input) == 3) {
        $output .= '/>';
      }

However, what it WILL DO, if $output.='/>'; is not changed to $output.='>'; is litter the code with '/'s, which causes the embed to break in IE. You should be able to see this behavior with any current youtube embed script.

My advice for current users experiencing this problem is to drop the '/' and test to make sure it works. I'm not convinced this is a permanent fix, but it might help other users trying to get embed filter to work correctly. I suspect that entire code block that's counting tags will need to be dropped, because it was probably only tested with one or two sites' embeds.

#1

ragaskar - October 11, 2007 - 02:13

As a further example, here's what embed filter does to the following:

<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/pAbyC7UFllE"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/pAbyC7UFllE" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>

<object width="425" height="350"/>

<param name="movie" value="http://www.youtube.com/v/pAbyC7UFllE"//></param>
<embed src="http://www.youtube.com/v/pAbyC7UFllE" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"//></embed></object>

 
 

Drupal is a registered trademark of Dries Buytaert.