Opened 12 years ago

Closed 10 years ago

#9393 closed Bug (fixed)

HTML comments handling

Reported by: Invictus Owned by:
Priority: Normal Milestone:
Component: Core : Styles Version: 3.0
Keywords: Cc:


Applying styles to a document which contains html comments produces some unexpected markup.

For example, applying bold style to the following document

	test paragraph1</p>
<!-- test comment -->
	test paragraph2</p>
	test paragraph3</p>
	test paragraph4</p>

transforms it into

	<strong>test paragraph1</strong></p>
	<strong><!-- test comment --></strong></p>
	<strong>test paragraph2</strong></p>
	<strong>test paragraph3</strong></p>
	<strong>test paragraph4</strong></p>

Tested on Demo page with Google Chrome 21, and Firefox 15.

Attachments (1)

Firebug.png (12.6 KB) - added by Jakub Ś 12 years ago.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by Jakub Ś

Attachment: Firebug.png added

comment:1 Changed 12 years ago by Jakub Ś

Keywords: comments removed
Status: newconfirmed

Problem has been reproducible from CKEditor 3.0.

Seems that because of comment strong tag is wrapped around paragraph and extra empty paragraph is produced (See Firebug.png). When you switch to source and back code gets fixed (inline elements are wrapped in block elements) thus you get the following result.

NOTE: till version CKEditor 3.5.2, when you switch to source you could see that comment gets included in one of paragraphs. From CKEditor 3.5.3 comment is left outside of paragraphs but this has absolutely no influence on final result.

comment:2 Changed 10 years ago by Jakub Ś

Resolution: fixed
Status: confirmedclosed

This issue has expired on master. It works in CKEditor 4.x.

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