Opened 7 years ago

Last modified 6 years ago

#6164 confirmed Bug

IE stripping object/embed tags with templates

Reported by: mcgovern Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0.2
Keywords: Cc: mcgovern@…

Description

I have created a custom template and added it to the list of templates. It outputs a generic embedded audio file using an object and embed tag. However, in IE6 and IE7, when the markup is placed into the editor, the embed tag and all but one of the param tags are stripped out. It seems to only way to get this to not happen is to set the embed type to "application/x-shockwave-flash". So, in essence, this bug does not occur for embedded flash content.

Here is the markup added to the templates list:

<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" /></object>

In IE6 and IE7, the result added to the editor is:

<object id="audio" width="0" height="0"><param name="console" value="AudioPlayer" /></object>

I have tried with many different variations of the object, param and embed attributes all with the same result. However, I can cut/paste the code into the editor and it is not stripped out so it seems to be somehow related to the template functionality.

Change History (2)

comment:1 Changed 7 years ago by mcgovern

Cc: mcgovern@… added

comment:2 Changed 6 years ago by Jakub Ś

Status: newconfirmed
Version: 3.3.23.0.2

Add the below code to _source\plugins\templates\templates\default.js

,
{
	title: 'My Object',
	image: 'template3.gif',
	description: 'my object',
	html:					
		'<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" />'+
		'</object> '						
}

If you won't specify type="application/x-shockwave-flash" for the embed tag the code from template will be stripped down to:

<object id="audio" width="0" height="0"><param name="console" value="AudioPlayer" /></object> 

This has reproducible in all versions of IE from CKEditor 3.0.2

Just like @mcgovern have said it - if you paste the code in source and switch to WYSIWYG it won't get stripped.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy