Opened 14 years ago

Last modified 13 years ago

#5535 confirmed Bug

Stack overlow in IE6 when pasting strange HTML

Reported by: Wiktor Walc Owned by:
Priority: Normal Milestone:
Component: General Version: 3.0
Keywords: IE HasPatch Cc: satya_minnekanti@…

Description

When pasting HTML that contains lots of nested tags, IE6 throws an error: "stack overflow at line: 27".

Steps to reproduce

  • Open _samples/api.html
  • Copy content from attached file
  • Paste it into the textarea
  • Press the "Insert HTML" button

Attachments (3)

multiple_tags_stack_overflow.txt (11.1 KB) - added by Wiktor Walc 14 years ago.
ckeditor-htmlparser-recursion-test.patch (643 bytes) - added by Ivan Shvedunov 14 years ago.
ckeditor-htmlparser-recursion.patch (2.6 KB) - added by Ivan Shvedunov 14 years ago.
fixed a typo in the patch

Download all attachments as: .zip

Change History (6)

Changed 14 years ago by Wiktor Walc

Changed 14 years ago by Ivan Shvedunov

comment:1 Changed 14 years ago by Ivan Shvedunov

The bug actually does affect any browser. The problem is that CKEDITOR.htmlParser.element.prototype.writeHtml method uses recursion, thus causing inevitable stack overflow on 'strange' html documents with deep nesting which sometimes are encountered in the wild. Attached are patches for ckeditor tests and for ckeditor itself that fix it by using array-based stack instead of recursion when writing element hierarchies.

Changed 14 years ago by Ivan Shvedunov

fixed a typo in the patch

comment:2 Changed 14 years ago by Alfonso Martínez de Lizarrondo

Keywords: HasPatch added

comment:3 Changed 13 years ago by Satya Minnekanti

Cc: satya_minnekanti@… added
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