sleemanj / xinha

WYSIWYG HTML Editor Component (turns <textarea> into HTML editors)
http://trac.xinha.org/
Other
13 stars 2 forks source link

TransformerInnerHTML.js hangs browser in raw image data "img" tag (Trac #1596) #1596

Closed sleemanj closed 3 years ago

sleemanj commented 11 years ago

I am using Xinha to allow rich text editing in my web application. When the editor component gets an "img" tag with raw base64 encoded image data in it (see template file for html img data that cause the problem) the TransformerInnerHTML.js script hangs on the "cleanHTML" method. Probably the regular expression match and replace takes too long for these type of use cases. Problem is reproducible in Xinha 0.95. I haven't tried other Xinha versions.

Reported by guest, migrated from http://trac.xinha.org/ticket/1596

sleemanj commented 11 years ago

Raw image data that cause the problem. Attachment: raw_img_data.zip

sleemanj commented 11 years ago

ejucovy changed cc to ejucovy

sleemanj commented 11 years ago

WFM, Firefox 58

Probably time has marched on since this was reported and processor speed has caught up.

Also, putting that much Data URI in a page is a bad idea generally, and DOMWalk will be faster.