Ticket #5336 (closed defect: fixed)

Opened 1 year ago

Last modified 8 months ago

TinyMCE Mangles <object> tag's

Reported by: DaveHope Assigned to: anonymous
Priority: normal Milestone: 2.5
Component: TinyMCE Version: 2.3.1
Severity: normal Keywords:
Cc: torbens

Description (Last modified by lloydbudd)

I'm trying to embed some flash to a page on my site, I'm entering the correct <object> & <enbed> code into the page, which displays fine.

However, If I goto edit the page at a later date the code gets mangled, wordpress inserts a </object> before the <embed> and replaces me closing /> with ></embed>

This is a real pain, as it means I have to re-edit my flash every time i alter the page.

Is there a tag to prevent wordpress altering html, or should this be reported as a bug? - I'm guessing the html tidy process doesn't like <object> & <embed>

The HTML i'm adding to the code window can be seen here:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" height="600" width="500">
<param name="movie" value="/Files/polaroid.swf" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="flashvars" value="flickrID=17378729@N00" /><embed src="/Files/polaroid.swf" menu="false" quality="high" bgcolor="#fff" flashvars="flickrID=17378729@N00" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" height="600" width="500" /></object>

I know that as a wordaround I could probably disable the TinyMCE editor, but 95% of the time it's fine.

Dave

Change History

11/12/07 19:09:30 changed by lloydbudd

  • summary changed from Wordpress Mangles <object> tag's to TinyMCE Mangles <object> tag's.
  • description changed.
  • milestone set to 2.5.

11/13/07 00:33:55 changed by Viper007Bond

Do you have the correct XHTML thing on?

And yes, disable TinyMCE. :P

11/13/07 18:52:04 changed by DaveHope

Do you mean am I using the correct DocTag?? - If so, yes I am.

11/13/07 21:46:45 changed by Viper007Bond

Huh? No.

Options > Writing

Make sure "WordPress should correct invalidly nested XHTML automatically" is unticked.

11/14/07 17:56:38 changed by DaveHope

Alas, that option is already un-ticked.

01/03/08 15:51:45 changed by torbens

  • milestone changed from 2.6 to 2.5.

I can confirm this behaviour. Inserting this code:

<object id="16534" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="110" width="315">
<param value="/media/0,4906,16534,00.swf" name="movie"></param>
<param value="high" name="quality"></param>
<param value="#dcdcdc" name="bgcolor"></param>
<param value="false" name="menu"></param> 	<embed src="http://www.spiegel.de/media/0,4906,16534,00.swf" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" menu="false" bgcolor="#dcdcdc" quality="high" name="16534" height="110" width="315"></embed></object>

results in TinyMCE modifying it to:

<object id="16534" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" height="110" width="315"></object>

<param value="/media/0,4906,16534,00.swf" name="movie"></param>
<param value="high" name="quality"></param>
<param value="#dcdcdc" name="bgcolor"></param>
<param value="false" name="menu"></param> 	<embed src="http://www.spiegel.de/media/0,4906,16534,00.swf" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" menu="false" bgcolor="#dcdcdc" quality="high" name="16534" height="110" width="315"></embed>

Very annoying...

01/03/08 15:52:15 changed by torbens

  • cc set to torbens.

02/09/08 06:03:53 changed by DD32

  • status changed from new to closed.
  • resolution set to fixed.

WordPress 2.4/2.5's TinyMCE has a built-in flash functionality.

Heres the HTML it generates: (as seen on the published page, i'm pretty sure its identical in the edit window)

<p><object height="110" width="315" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"><param value="http://www.spiegel.de/media/0,4906,16534,00.swf" name="src" /><embed height="110" width="315" src="http://www.spiegel.de/media/0,4906,16534,00.swf" type="application/x-shockwave-flash"></embed></object></p>

Appears to be fixed.