Opened 12 years ago

Last modified 12 years ago

#8977 confirmed Bug

CKEditor locks the browser (javascript loop) with certain contents

Reported by: Alessandro Polverini Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: Cc:

Description

When CK is instantiated with some kind of contents there is some kind of loop (I think it's on the parser) that locks the browser.

Tested with chrome and FF.

I attach a simple html with a test case that shows the behavior

Attachments (1)

bug-3.6.3.html (1.1 KB) - added by Alessandro Polverini 12 years ago.

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by Alessandro Polverini

Attachment: bug-3.6.3.html added

comment:1 Changed 12 years ago by Alessandro Polverini

The attach is a self-contained html page exhibiting the problem: the JS code runs in loop blocking the page in the browser.

comment:2 Changed 12 years ago by Jakub Ś

Resolution: invalid
Status: newclosed

You have used invalid HTML that is why you have got weird result.

<title></title>
<meta name="GENERATOR" ></meta>

Removing just one of the above works.

title: - http://www.w3schools.com/tags/tag_title.asp - there can be only one title tag on page you have used two

meta - http://www.w3schools.com/tags/tag_meta.asp - your page uses HTML4 where meta tag is allowed in head section only (There is microdata in HTML5 http://www.w3.org/TR/html5/microdata.html which allows for meta tags across the body but this is not the case here - wrong HTML version and wrong syntax for microdata).

comment:3 Changed 12 years ago by Alessandro Polverini

The text is entered by the user (via other means) and thus it can by of any kind.

I dont't find right that the parser goes in loop in this case. Also, older FCK handled it correctly without any problem.

Can this bug be reopened please?

Any kind of input that make loop the parser should be regarded as a bad bug, IMHO.

comment:4 Changed 12 years ago by Alfonso Martínez de Lizarrondo

I also agree that hanging the editor because the user has pasted some bad content isn't very user friendly and should never happen.

comment:5 Changed 12 years ago by Jakub Ś

Resolution: invalid
Status: closedreopened

comment:6 Changed 12 years ago by Jakub Ś

Status: reopenedconfirmed
Version: 3.0

This decision was actually consulted: P

@alfonsoml, @Alex, agreed that CKEditor should not go into infinite loop no matter what you paste

@Alex - meta tag suggests that such "template" was made by generator - I don't know who wrote it but if you have access to its source code then maybe you should think of correcting it.


Problem occurs in:
URI: ckeditor\_source\core\htmlparser\fragment.js
Code: if ( currentNode.parent ) addElement( currentNode, currentNode.parent, 1 );
Loop happens when meta tag is processed.

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