Opened 11 years ago

Closed 11 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:

Description

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);
editor.document.getBody().append(i);

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

<p>
	This is some <strong>sample text</strong>. You are using <a href="http://www.fckeditor.net/">FCKeditor</a>.</p>
<object><embed></object>

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 11 years ago.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by Martin Kou

Attachment: 2780.patch added

comment:1 Changed 11 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 11 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 11 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 11 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 – 2019 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy