Opened 12 years ago
Closed 11 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: |
Description
Applying styles to a document which contains html comments produces some unexpected markup.
For example, applying bold style to the following document
<p> test paragraph1</p> <!-- test comment --> <p> test paragraph2</p> <p> test paragraph3</p> <p> test paragraph4</p>
transforms it into
<p> <strong>test paragraph1</strong></p> <p> <strong><!-- test comment --></strong></p> <p> <strong>test paragraph2</strong></p> <p> </p> <p> <strong>test paragraph3</strong></p> <p> <strong>test paragraph4</strong></p>
Tested on Demo page with Google Chrome 21, and Firefox 15.
Attachments (1)
Change History (3)
Changed 12 years ago by
Attachment: | Firebug.png added |
---|
comment:1 Changed 12 years ago by
Keywords: | comments removed |
---|---|
Status: | new → confirmed |
Version: | 3.6.4 → 3.0 |
comment:2 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
This issue has expired on master. It works in CKEditor 4.x.
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.