Opened 5 years ago

Last modified 5 years ago

#8977 confirmed Bug

CKEditor locks the browser (javascript loop) with certain contents

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


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 Alex 5 years ago.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by Alex

comment:1 Changed 5 years ago by Alex

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 5 years ago by j.swiderski

  • Resolution set to invalid
  • Status changed from new to closed

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

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

Removing just one of the above works.

title: - - there can be only one title tag on page you have used two

meta - - your page uses HTML4 where meta tag is allowed in head section only (There is microdata in HTML5 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 5 years ago by Alex

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 5 years ago by alfonsoml

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 5 years ago by j.swiderski

  • Resolution invalid deleted
  • Status changed from closed to reopened

comment:6 Changed 5 years ago by j.swiderski

  • Status changed from reopened to confirmed
  • Version set to 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 – 2016 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy