Opened 12 years ago

Last modified 12 years ago

#9414 confirmed Bug

Browser hangs and crashes when editing some valid HTML combination

Reported by: Rodrigo Siqueira Owned by:
Priority: Normal Milestone:
Component: General Version: 3.6.4
Keywords: Cc:

Description

On the demo page, edit as "Source" and paste this: <br><ul><pre>TEST</pre></ul>

This will crash the browser when trying to view or edit as html again. Tested in all browsers (Chrome, Firefox, Safari, IE 9).

Seems to be some kind of infinite loop because browser starts using lots of cpu.

Change History (3)

comment:1 Changed 12 years ago by Rodrigo Siqueira

There are many other valid HTML that also hangs and crashes the editor when editing Source, like this:

<h1>test</h1><br>

<dl>

<dt><h3>test</h3></dt>

</dl>

comment:2 Changed 12 years ago by Jakub Ś

Keywords: crash removed
Status: newconfirmed

To reproduce:

  1. Paste one of the below in source and switch to WYSIWYG.
    <h1>test</h1><br /> 
    <dl> 
    <dt><h3>test</h3></dt> 
    </dl> 
    
    <br /><ul><pre>TEST</pre></ul>
    

Result:
Infinite script hanging CKEditor in all browsers from CKEditor 3.6.4 rev [7526]
CKEditor 3.6.4, URI: /ckeditor/_source/core/htmlparser/fragment.js:454
CKEditor 4, URI: ckeditor4/core/htmlparser/fragment.js:417

@rsiqueira Please note that CKEditor 3.x is XHTML1.1 compliant (something like extended HTML4) in which both of these HTML snippets are invalid. You can't have pre directly in ul and dt can hold only inline content.
In CKEditor 4.x which we will try to make fully HTML5 compliant, the example with definition lists is valid. But the key thing here is rather this br tag before the list.

Despite html being valid or not, CKEditor should not hang.

comment:3 Changed 12 years ago by Jakub Ś

Other tickets that were caused by this revision are: #9167and #9203.

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