Opened 15 years ago

Closed 15 years ago

#2780 closed Bug (duplicate)

Protected elements are being outputted without closing tags.

Reported by: Martin Kou Owned by: Martin Kou
Priority: Must have (possibly next milestone) Milestone: CKEditor 3.0
Component: General Version: SVN (FCKeditor) - Retired
Keywords: Review- Cc:


Run the following code in Firebug, with replacebyclass.html sample opened:

var editor = CKEDITOR.instances.editor1;
var o = new CKEDITOR.dom.element('object', editor.document);
o.append(new CKEDITOR.dom.element('embed', editor.document));
var i = editor.fakeobjects.protectElement(o);

An object with an embed tag inside is inserted to the document. Now switch to Source mode. The HTML output reads like this:

	This is some <strong>sample text</strong>. You are using <a href="">FCKeditor</a>.</p>

Note the <embed> tag doesn't have a closing tag, and it's not self closing.

Attachments (1)

2780.patch (4.2 KB) - added by Martin Kou 15 years ago.

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by Martin Kou

Attachment: 2780.patch added

comment:1 Changed 15 years ago by Martin Kou

Keywords: Review? added

Not sure if it's ok to modify the dtd.js for this purpose.

comment:2 Changed 15 years ago by Martin Kou

Keywords: Review- added; Review? removed

After some discussion with Fred, it shouldn't be required to add embed to dtd.js for it to appear - that's a bug in the htmldataprocessor plugin. So instead of hacking dtd.js, a fix for htmldataprocessor is required.

comment:3 Changed 15 years ago by Artur Formella

Ok, so how to protect EMBED element?

This code:

var a= editor.document.createElement( 'embed' );
editor.fakeobjects.protectElement( a );

doesn't work.

comment:4 Changed 15 years ago by Martin Kou

Resolution: duplicate
Status: newclosed

This is a dup of #2860, which is already fixed.

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