# Stop replacing \<br\> tags with \<div data-empty="true"\>\<br\>\</div\> and adding \<span data-fr-verified="true"\> tags

**URL:** <https://forum.mautic.org/t/stop-replacing-br-tags-with-div-data-empty-true-br-div-and-adding-span-data-fr-verified-true-tags/27790>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [April 21, 2023, 9:54am UTC](https://forum.mautic.org/t/stop-replacing-br-tags-with-div-data-empty-true-br-div-and-adding-span-data-fr-verified-true-tags/27790 "2023-04-21T09:54:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![IonutOjicaDe](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ionutojicade/32/7383_2.png) [@IonutOjicaDe](https://forum.mautic.org/u/IonutOjicaDe)\
**Post date:** [April 21, 2023, 9:54am UTC](https://forum.mautic.org/t/stop-replacing-br-tags-with-div-data-empty-true-br-div-and-adding-span-data-fr-verified-true-tags/27790/1 "2023-04-21T09:54:14Z")

</div>

**Your software**  
My Mautic version is: 4.4.7  
My PHP version is: 7.4.29  
My Database type and version is: 10.3.38-MariaDB-0ubuntu0.20.04.1  
I am using the classic editor (not the new mjml-one)

**Your problem**  
Mautic changes my email code in a wrong way.

All `<br>` tags are being replaced with

```auto
<div data-empty="true">
	<br>
</div>

```

Further more, I have some unusual replacements, that lead to the fact that `{contactfield=firstname}‍` is not being replaced in the emails.

Visually I see the correct text `{contactfield=firstname}‍`, but inside the code I see the following:

```auto
<span data-fr-verified="true">{</span>contactfield=firstname}‍

```

with a strange red bullet after the text, that apparently is not visible (see on the picture below).

I did not entered any of the div tags, nor the red bullet:  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/1/1221b0b4265b3a2e9311b9455b857a6b7b381d68.png)

_I would like to stop this replacement. Is it possible? Where should I look for?_

**These errors are showing in the log:**  
There are some errors in the log, but not relevant to the subject.

**Steps I have tried to fix the problem:**  
I searched on the forums, on google, everywhere for a solution or at least someone else that describes the same.

I found what the **red bullet** means: in UTF-8 (hex) is like this represented: “e2 80 8d” and it is a “ZERO WIDTH JOINER”. ([the character is here described](https://www.utf8-chartable.de/unicode-utf8-table.pl?start=8205&number=128)) . I do not know why this char is added in my email content.

Found also this Issue from Froala: [Data-empty = “true” causes problems. #1950](https://github.com/froala/wysiwyg-editor/issues/1950). They mention the files `js/froala_editor.min.js` and `js/froala_editor.pkgd.min.js`

Also searched inside the Mautic files and found the text `data-empty="true"` only in these two files: `app\bundles\CoreBundle\Assets\js\libraries\froala\plugins\paragraph_format.js` and `paragraph_format.min.js`

=\> So I edited the `app\bundles\CoreBundle\Assets\js\libraries\froala\froala_editor.js` and commented out these lines:

```auto
          // Current node is BR.
          else if (node.tagName == 'BR') {
            // There is no anchor.
            if (anchor == null) {
              anchor = editor.doc.createElement(default_tag);
              if (temp) anchor.setAttribute('data-empty', true);
              anchor.appendChild(node);

              main_doc.appendChild(anchor);
            }

            // There is anchor. Just remove BR.
            else {
              // There is nothing else except markers and BR inside the new formed tag.
              if (found === false) {
                anchor.appendChild(editor.doc.createElement('br'));
                anchor.setAttribute('data-empty', true);
              }
            }

            anchor = null;
          }

```

=\> can this action have secondary effects? (besides that I must redo the editing after the next update)

LATER EDIT:  
yes, one side effect is: Froala did not recognized paragraphs and I could not format as Heading 1/2/3/…  
Solved by updating to 4.4.8 , so the changes were reset.
