Describe the bug
<br> is getting compiled to different things based on if an mj-selector element is present in the MJML. It does not seem to matter if the mj-selector actually selects the block the <br> is in.
To Reproduce
Case 1: Example without mj-selector: https://mjml.io/try-it-live/To2DOPgd8
In this example,
...
<mj-text css-class="custom">
<p>
Hello World!<br>
</p>
</mj-text>
...
is compiled to
...
<p> Hello World!<br>
</p>
...
Case 2: Example with mj-selector, <br> is compiled to <br></br>: https://mjml.io/try-it-live/vjWLQhb0L
In this example,
...
<mj-text css-class="custom">
<p>
Hello World!<br>
</p>
</mj-text>
...
is compiled to
...
<p> Hello World!<br>
</br></p>
...
Note that the path of the mj-selector does not actually select the mj-text the <br> is in.
Case 3: Example with mj-selector but <br> is compiled to <br />: https://mjml.io/try-it-live/mjLo-DtRrc
In this example, the <br> is not placed in a <p>.
...
<mj-text css-class="custom">
Hello World!<br>
</mj-text>
...
is compiled to
...
Hello World!<br />
...
Again, the path of the mj-selector does not actually select the mj-text the <br> is in.
Expected behavior
Adding an mj-selector should not change what <br> is compiled to.
MJML environment (please complete the following information):
- MJML Version 5.3.0
- MJML tool used Try it Live
Describe the bug
<br>is getting compiled to different things based on if anmj-selectorelement is present in the MJML. It does not seem to matter if themj-selectoractually selects the block the<br>is in.To Reproduce
Case 1: Example without
mj-selector: https://mjml.io/try-it-live/To2DOPgd8In this example,
is compiled to
Case 2: Example with
mj-selector,<br>is compiled to<br></br>: https://mjml.io/try-it-live/vjWLQhb0LIn this example,
is compiled to
Note that the
pathof themj-selectordoes not actually select themj-textthe<br>is in.Case 3: Example with
mj-selectorbut<br>is compiled to<br />: https://mjml.io/try-it-live/mjLo-DtRrcIn this example, the
<br>is not placed in a<p>.is compiled to
Again, the
pathof themj-selectordoes not actually select themj-textthe<br>is in.Expected behavior
Adding an
mj-selectorshould not change what<br>is compiled to.MJML environment (please complete the following information):