Opened 13 years ago
Last modified 13 years ago
#8344 review New Feature
Remove nested duplicate inline elements on parsing
Reported by: | Frederico Caldeira Knabben | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Parser | Version: | |
Keywords: | IBM | Cc: |
Description
When parsing something like this:
<b>One <b>Two</b> Three</b>
... the editor parser should simplify the output, having this:
<b>One Two Three</b>
Other than cleanup up the HTML, it would help on the overall editor performance, because it'll reduce the DOM tree size on those cases.
This is a followup of #8322.
Attachments (1)
Change History (4)
Changed 13 years ago by
Attachment: | 8344.patch added |
---|
comment:1 Changed 13 years ago by
Owner: | set to Frederico Caldeira Knabben |
---|---|
Status: | new → review |
comment:2 Changed 13 years ago by
Steps we used to reproduce the defect
Copy the content from attached file, paste into source view and go back to Rich Text
we have tried the patch and these are the issues that we have found
FF some content lost when we pasted the content and switched to Rich text ( Paragraphs of text between test line 1 & Test line 7 are missing.)
IE9 browser crashes when we paste the text go to rich text back to source and then back to Rich text
IE(6,7,8), FF ,Opera 2 new empty paragraphs( ) added at beginning of doc every time we navigate between souce and rich text or we destroy and create Editor instances
comment:3 Changed 13 years ago by
Keywords: | IBM added |
---|
The idea on this patch is to simply ignore nested inline elements that are totally identical.
Tests have been added to cover this tickets and support the changes on t/8344:
http://ckeditor.t/dt/core/htmlparser/htmlparser.html
http://ckeditor.t/dt/core/htmlparser/element.html
The attachment provided at #8322 can be useful for testing.
As expected, I've noticed some impact on the parser performance due to this change. While the above attachment will perform better, good quality HTML may suffer a bit with it. Of course, we're talking about a few milliseconds difference.