Opened 17 years ago

Closed 17 years ago

#359 closed Bug (fixed)

IE Stripping Object Tag

Reported by: mcgovern@… Owned by:
Priority: Normal Milestone: FCKeditor 2.4.3
Component: General Version: SVN (FCKeditor) - Retired
Keywords: SF Confirmed IE Cc:


I am experiencing a problem with FCKeditor while using IE 6. If I load HTML into the editor that contains an object tag with an embed tag (see sample below), the editor strips out the object tag completely. However, the embed tag remains. This does not happen in other browsers. Here is the code I am using.

<object id="audio" width="0" height="0">
<param name="console" value="AudioPlayer">
<param name="controls" value="audioWindow">
<param name="autostart" value="true">
<param name="src" value="YOUR_AUDIO_FILENAME_HERE">
<embed name="audio" width="0" height="0" src="YOUR_AUDIO_FILENAME_HERE"
console="AudioPlayer" controls="audioWindow" autostart="true">

This only happens when reading the HTML into the editor initially. If I cut and paste this code into the editor and stay in source mode, it is not altered, until after I save it to the server and re-load into the editor. At this point it is still correct on the server, but changed in the editor. If I then save it again, the changed version is saved. If I cut and paste this code into the editor but leave source mode before saving, it is changed. The end result seems to always be stripping out the object tag.

Moved from SF:

Change History (3)

comment:1 Changed 17 years ago by Frederico Caldeira Knabben

Reporter: changed from Frederico Caldeira Knabben to mcgovern@…

comment:2 Changed 17 years ago by Frederico Caldeira Knabben

Keywords: Confirmed IE added
Milestone: FCKeditor 2.5
Version: FCKeditor 2.4SVN

Confirmed with IE6. Ok with FF2.

The problem here is that IE has a terrible DOM tree... let me try to explain.

If a <object> tag can't be load for any reason, it is completely ignored in the DOM tree (<param> elements too), and its contents are rendered instead.

In your example, the <object> element is missing the required "classid" attribute, being not valid. So the <object> element is ignored and only <element> goes to the DOM.

So, it seams that the only feasible solution is to protect the <object> tags in WYSIWYG mode, displaying them only in the source. For this, just add the following to the configuration file:

FCKConfig.ProtectedSource.Add( /<object[\s|\S]+?<\/object>/gi ) ;

We'll be much probably handle this internally in the editor code, not requiring it to be included in the configuration file. So, I'm leaving this ticket opened until the fix is not available.

comment:3 Changed 17 years ago by Frederico Caldeira Knabben

Milestone: FCKeditor 2.5FCKeditor 2.4.3
Resolution: fixed
Status: newclosed

Fixed with [327].

Click here for more info about our SVN system.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy