Ticket #5336 (closed defect (bug): fixed)
TinyMCE Mangles <object> tag's
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.5 |
| Component: | TinyMCE | Version: | 2.3.1 |
| Severity: | normal | Keywords: | |
| Cc: | torbens |
Description (last modified by lloydbudd) (diff)
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
- Summary changed from Wordpress Mangles <object> tag's to TinyMCE Mangles <object> tag's
- Description modified (diff)
- Milestone set to 2.5
comment:2
Viper007Bond — 4 years ago
Do you have the correct XHTML thing on?
And yes, disable TinyMCE. :P
comment:4
Viper007Bond — 4 years ago
Huh? No.
Options > Writing
Make sure "WordPress should correct invalidly nested XHTML automatically" is unticked.
- 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...
- 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.
