TinyMCE is modifying the XHTML 1.0 Strict HTML I input. How can I stop it?
- by Matt
The code I want to have saved through TinyMCE is as follows:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="90" id="homepage-banner">
<param name="movie" value="/images/header.swf" />
<param name="wmode" value="transparent" />
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="/images/header.swf" width="550" height="90">
<param name="wmode" value="transparent" />
<!--<![endif]-->
<img src="/images/header.jpg" width="550" height="90" alt="" border="0" />
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
Sadly, what I end up with is:
<object data="/images/header.swf" height="90" type="application/x-shockwave-flash" width="550">
<param name="id" value="homepage-banner" />
<param name="wmode" value="transparent" />
<param name="src" value="/images/header.swf" />
</object>
The purpose of the stripped parts of the code is to provide a fallback image if flash is not available on the client.
In my tinyMCE.init({ ... }); I am using verify_html: true and valid_elements is set as per this forum topic whereby all valid XHTML 1.0 Strict elements are allowed. I have checked and the above code does comply with the XHTML 1.0 Strict standard.
I have tried just setting verify_html to false but it had no effect. How can TinyMCE be configured to leave my HTML alone?!