erusev / parsedown

Better Markdown Parser in PHP
https://parsedown.org
MIT License
14.68k stars 1.12k forks source link

setSafeMode prevents multiple line breaks #856

Open QuestionDevelopment opened 8 months ago

QuestionDevelopment commented 8 months ago

Good day, When rendering the following markdown

Lorem ipsum dolor sit amet, consectet**ur adipiscing e**lit, sed *do eiusmod te*mpor incididunt ut labore et.

<br>
<br>
<br>
<br>
<br>
* da
* ASD
* sd

Parsedown encodes the
tags when setsafemode is enabled. I have tried with setBreaksEnabled enabled and disabled. No difference in results. Html generated is as follows:

<p>Lorem ipsum dolor sit amet, consectet<strong>ur adipiscing e</strong>lit, sed <em>do eiusmod te</em>mpor incididunt ut labore et.</p>
<p>&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;</p>
<ul>
<li>da</li>
<li>ASD</li>
<li>sd</li>
</ul>
<p>ASDSDSsdasdasda</p>

My apologizes if this is by design but as far as I can tell there would be no way to ever use safe mode if this is true.