Ticket #8977 (confirmed Bug)

Opened 3 years ago

Last modified 3 years ago

CKEditor locks the browser (javascript loop) with certain contents

Reported by: Alex 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

bug-3.6.3.html (1.1 KB) - added by Alex 3 years ago.

Change History

Changed 3 years ago by Alex

comment:1 Changed 3 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 3 years ago by j.swiderski

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

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

  • Status changed from closed to reopened
  • Resolution invalid deleted

comment:6 Changed 3 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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy