sstur / react-rte

Pure React rich text WYSIWYG editor based on draft-js.
https://react-rte.org
ISC License
2.86k stars 431 forks source link

Many newlines causes editor to go into an infinite loop #447

Open shahify opened 2 years ago

shahify commented 2 years ago

Hi friends,

I was wondering if you had any ideas why the following text pasted into the HTML input field (2nd textarea) of the demo would cause the editor to go into an infinite loop and hang the browser (Chrome 103 on Mac)? I thought it might be the newlines, but not sure why that would cause problems.

<p>Welcome to Botched: A D&amp;D Podcast! While the group has decided <br> to go to The Dreamlands. It doesn’t seem like it’s the easiest place to get to. <br> In fact, Warren and Francis don’t seem all that enthused on sharing the secrets <br> of how to get there. Hell, Warren isn’t even present. His brother Francis watches <br> over him while he rules The Dreamlands under some other name. The group does <br> eventually decide to brave The Dreamlands though. However, it’s not like a <br> normal dream. Things that happen there carry over to the real world, so danger <br> is just as dangerous! What sort of crazy inhabits The Dreamlands? How do you <br> get to The Dreamlands? How do you have a four-person bicycle? <br> Tune in and find out! <br> <br> <br> <br> Join in on the banter as these dickheads whose understanding <br> of the rules is questionable, and their moral compasses are even more so, <br> stumble through dungeons, traps, monsters, and social intricacies as they <br> attempt to complete a quest for wholly selfish reasons. &nbsp;<br> <br> <br> <br> If you are a veteran dragon slayer from the long long ago of <br> the 1970’s or a newbie who is interested in hearing what this devil worshipping <br> game is all about, Botched: A D&amp;D Podcast is the DnD Podcast for you. As <br> mentioned, we are playing 5th edition rules, so if you’ve never played <br> this version of the game before, listening to us will give you an idea of how <br> it may be different from previous versions of the game. 5th edition <br> is a great rule set to start playing the game with. Find out if there’s a local <br> game near where you live at comic book or game stores. Hell, buy some books, <br> buy some dice, get some food and drinks and invite your friends over to play <br> with you for completely different experience! <br> <br> <br> <br> A special shout out and thank you to all of our supporters over on &nbsp;Patreon. You help us continue to churn out “quality” episodes. With your &nbsp;continued support we can upgrade our dining room, I mean studio, with &nbsp;better quality microphones, sound proofing and merchandise. Help us &nbsp;achieve our goals and reap the benefits as we will begin producing &nbsp;novellas of the seasons, behind the scenes features and live shows! &nbsp;Check out our store over at Botched Podcast where you can find tshirts, &nbsp;stickers, prints and more! <br> <br> <br> <br> Thank you to those who have taken the time to give us a 5 star &nbsp;review over on Itunes! It helps the show grow, and we greatly appreciate &nbsp;it! A big big thank you to the following: <br> <br> <br> <br> <br> Zlw365 <br> <br> Elliebells 1543 <br> <br> Nigel <br> Molassesfinger <br> <br> Castle McFall <br> <br> Joshua Archiquette <br> <br> Pokemon In <br> D&amp;D <br> <br> Fearravine <br> <br> Kory Sarracini <br> <br> Chuggzernaut <br> <br> Pmbear <br> <br> SiroVai123 <br> <br> Aatamos <br> <br> UltDave <br> <br> BlackGary <br> <br> &lt;&gt; BigJim <br> <br> Badbreatth <br> <br> Skuuf <br> <br> Noverton <br> <br> Riku210 <br> <br> Ninjagod99 <br> <br> HiyaitsSandi <br> <br> Admaletz <br> <br> Acinda <br> <br> FlipFlapAgronomacus <br> <br> Selfcleaningmutant <br> <br> Falcon Phire <br> <br> Captain Hygiene <br> <br> Johndonmoyer <br> <br> Littlefam90 <br> <br> Iluvpasta47 <br> <br> Walter Rice <br> <br> Fishdick69 <br> <br> Stargatesnatch <br> <br> Icantpay <br> <br> Chanticlear22 <br> <br> Nubian Guido <br> <br> Kitkat the Katkat <br> <br> NightmareLovely <br> <br> Wonderlandreject <br> <br> Kitchenaidfleshlight <br> <br> Missourimule <br> <br> Raegun11:11 <br> <br> Gjkkgffg <br> <br> C-rad Tummytickler</p>