meliorence / react-native-render-html

iOS/Android pure javascript react-native component that renders your HTML into 100% native views
https://meliorence.github.io/react-native-render-html/
BSD 2-Clause "Simplified" License
3.48k stars 589 forks source link

Render Error, maximum call stack size exceeded (native stack depth) #644

Open MuhammadQasim1122 opened 1 year ago

MuhammadQasim1122 commented 1 year ago

Decision Table

Good Faith Declaration

Description

This is the HTML that is using to renderHTML: <p><span style="white-space: normal;"><strong><span><span><strong><span><strong><span><b>Python Daily Stand-up Meeting Minutes: Date: 28 Sep,23&nbsp;</b><br><b>Attendees</b><span>: &nbsp;@muhammad.adeel&nbsp;<span><strong><span><span><span><span><span>&nbsp;</span><span></span><span contenteditable="false" class="mention--highlight"><span data-mention="farva.khursheed"><span><a id="farva.khursheed" class="mention-link other--highlight">@Farva Khursheed</a></span></span></span>&nbsp;&nbsp;<span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span>&nbsp;</span><span></span><span contenteditable="false" class="mention--highlight"><span data-mention="usama.nadeem"><span><a id="usama.nadeem" class="mention-link other--highlight">@Usama Bin Nadeem</a></span></span></span>&nbsp;<span></span><span contenteditable="false" class="mention--highlight"><span data-mention="usman.bhatti"><span><a id="usman.bhatti" class="mention-link other--highlight">@Usman Bhatti</a></span></span></span>&nbsp;<span><strong><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span>@harib.siddique&nbsp;<span style="white-space: normal;"><strong><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><span><strong><span><strong><span><span>@nouman.ejaz</span></span></strong></span></strong></span></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></span></span></span></strong></span></span><br><b>Absent Attendees</b><span>:&nbsp;</span><span></span><span contenteditable="false" class="mention--highlight"><span data-mention="waleed.ahmed"><span><a id="waleed.ahmed" class="mention-link other--highlight">@Waleed Ahmed</a></span></span></span><span>&nbsp;<span><span>&nbsp;<span><strong><span><span>@sohaib.anwar&nbsp;<span><strong><span><span>&nbsp;&nbsp;<span></span><span contenteditable="false" class="mention--highlight"><span data-mention="talha.azeem"><span><a id="talha.azeem" class="mention-link other--highlight">@Talha Azeem</a></span></span></span>&nbsp;<span><strong><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><strong><span><span><span><strong><span><span><span><span>@zohaib.shamshad&nbsp;<span><strong><span><span><strong><span><strong><span><span>&nbsp;</span></span></strong></span></strong></span></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></strong></span><p><span style="white-space: normal;"><strong><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><span><strong><span><strong><span><span><br></span></span></strong></span></strong></span></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></strong></span></p><p><span style="white-space: normal;"><strong><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><span><strong><span><strong><span><span><br></span></span></strong></span></strong></span></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></strong></span></p><p><p><span style="white-space: normal;"><span style="white-space: normal;"><p style="font-weight: bold;"><strong>Adeel, Osama, and Harib:</strong></p><ul><li>The MiltecLMS project is progressing well as we kickstarted a new sprint.</li><li>During this sprint, we focused on tasks related to questions, assessments, module development, and training modules.</li><li>We are actively working on the SCORM file research and development, which is still in progress.</li><li>Efforts were made to refine the order of modules for a better user experience.</li><li>Minor adjustments were requested from the frontend team and have been incorporated.</li><li>The sprint has been successfully completed without major issues.</li></ul><p style="font-weight: bold;"><strong>Usama and Usman:</strong></p><ul><li>In our work on Investreak, we encountered a temporary setback when facing a blocker. We were attempting to run lead generation on the local system but encountered issues with leads not being added to the live database.</li><li>We are utilizing various APIs, including Apollo, and other open APIs to validate leads.</li><li>We are currently awaiting Business Development (BD) to share the files that have been passed through debounce; unfortunately, we have not received them yet.</li><li>With the data we currently have, we achieved 57% accuracy in our operations.</li></ul><p style="font-weight: bold;"><strong>Farva:</strong></p><ul><li>In the Phistat-Sols project, I have been actively engaged in client communication, participating in several client calls.</li><li>Today, I have another call scheduled with clients to discuss project estimations.</li></ul><p style="font-weight: bold;"><strong>Nouman:</strong></p><ul><li>I've been dedicated to the Predicto project, and I'm excited to report that it is now live and deployed on the server.</li><li>There were some concerns from the DevOps side, which I have addressed and resolved.</li><li>Today, I will be sharing the staging server with the client for testing and gathering feedback.</li></ul></span><br></span></p></p></p> piece of code: <RenderHtml contentWidth={dimensions.width} source={source} />

Screenshot 2023-10-18 at 12 03 29 PM

React Native Information

confer snap

RNRH Version

6.3.4

Tested Platforms

Reproduction Platforms

Minimal, Reproducible Example

<p><span style="white-space: normal;"><strong><span><span><strong><span><strong><span><b>Python Daily Stand-up Meeting Minutes: Date: 28 Sep,23&nbsp;</b><br><b>Attendees</b><span>: &nbsp;@muhammad.adeel&nbsp;<span><strong><span><span><span><span><span>&nbsp;</span><span></span><span contenteditable="false" class="mention--highlight"><span data-mention="farva.khursheed"><span><a id="farva.khursheed" class="mention-link other--highlight">@Farva Khursheed</a></span></span></span>&nbsp;&nbsp;<span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span>&nbsp;</span><span></span><span contenteditable="false" class="mention--highlight"><span data-mention="usama.nadeem"><span><a id="usama.nadeem" class="mention-link other--highlight">@Usama Bin Nadeem</a></span></span></span>&nbsp;<span></span><span contenteditable="false" class="mention--highlight"><span data-mention="usman.bhatti"><span><a id="usman.bhatti" class="mention-link other--highlight">@Usman Bhatti</a></span></span></span>&nbsp;<span><strong><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span>@harib.siddique&nbsp;<span style="white-space: normal;"><strong><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><span><strong><span><strong><span><span>@nouman.ejaz</span></span></strong></span></strong></span></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></span></span></span></strong></span></span><br><b>Absent Attendees</b><span>:&nbsp;</span><span></span><span contenteditable="false" class="mention--highlight"><span data-mention="waleed.ahmed"><span><a id="waleed.ahmed" class="mention-link other--highlight">@Waleed Ahmed</a></span></span></span><span>&nbsp;<span><span>&nbsp;<span><strong><span><span>@sohaib.anwar&nbsp;<span><strong><span><span>&nbsp;&nbsp;<span></span><span contenteditable="false" class="mention--highlight"><span data-mention="talha.azeem"><span><a id="talha.azeem" class="mention-link other--highlight">@Talha Azeem</a></span></span></span>&nbsp;<span><strong><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><strong><span><span><span><strong><span><span><span><span>@zohaib.shamshad&nbsp;<span><strong><span><span><strong><span><strong><span><span>&nbsp;</span></span></strong></span></strong></span></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></strong></span><p><span style="white-space: normal;"><strong><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><span><strong><span><strong><span><span><br></span></span></strong></span></strong></span></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></strong></span></p><p><span style="white-space: normal;"><strong><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><strong><span><span><span><span><span><strong><span><span><span><strong><span><span><span><strong><span><strong><span><span><span><strong><span><span><span><span><span><strong><span><span><strong><span><strong><span><span><br></span></span></strong></span></strong></span></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></span></span></span></strong></span></span></span></strong></span></strong></span></span></strong></span></span></span></strong></span></span></span></strong></span></span></span></span></span></strong></span></strong></span></span></strong></span></p><p><p><span style="white-space: normal;"><span style="white-space: normal;"><p style="font-weight: bold;"><strong>Adeel, Osama, and Harib:</strong></p><ul><li>The MiltecLMS project is progressing well as we kickstarted a new sprint.</li><li>During this sprint, we focused on tasks related to questions, assessments, module development, and training modules.</li><li>We are actively working on the SCORM file research and development, which is still in progress.</li><li>Efforts were made to refine the order of modules for a better user experience.</li><li>Minor adjustments were requested from the frontend team and have been incorporated.</li><li>The sprint has been successfully completed without major issues.</li></ul><p style="font-weight: bold;"><strong>Usama and Usman:</strong></p><ul><li>In our work on Investreak, we encountered a temporary setback when facing a blocker. We were attempting to run lead generation on the local system but encountered issues with leads not being added to the live database.</li><li>We are utilizing various APIs, including Apollo, and other open APIs to validate leads.</li><li>We are currently awaiting Business Development (BD) to share the files that have been passed through debounce; unfortunately, we have not received them yet.</li><li>With the data we currently have, we achieved 57% accuracy in our operations.</li></ul><p style="font-weight: bold;"><strong>Farva:</strong></p><ul><li>In the Phistat-Sols project, I have been actively engaged in client communication, participating in several client calls.</li><li>Today, I have another call scheduled with clients to discuss project estimations.</li></ul><p style="font-weight: bold;"><strong>Nouman:</strong></p><ul><li>I've been dedicated to the Predicto project, and I'm excited to report that it is now live and deployed on the server.</li><li>There were some concerns from the DevOps side, which I have addressed and resolved.</li><li>Today, I will be sharing the staging server with the client for testing and gathering feedback.</li></ul></span><br></span></p></p></p> render this html in the function as a source.

Additional Notes

No response

dhcmega commented 8 months ago

Hi, I have the same problema when there are too many nested tags. Somehow one of our users managed, using their own wysiwyg, to generate this for 3 lines of text:

<div class="form-group" style="color: #333333; font-size: 14px;">&nbsp;<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div>
<p style="color: #333333; font-size: 14px;">Estimados vecinos:</p>
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="form-group" style="color: #333333; font-size: 14px;">
<div class="row col-xs-12">
<p style="font-size: 14px;">Ya se encuentra disponible el News Semanal Edici&oacute;n 06/2024.</p>
<p style="font-size: 14px;">&nbsp;</p>
<p style="font-size: 14px;">Saludos cordiales, La Administraci&oacute;n.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div></div>
4mit commented 7 months ago

Im facing the same issue when html markup is too long