Ephox/Tidy acting strange.

Have a field called “callout” set as “sys_EditLive”

Creating a new Content Item with the following content pasted into the code tab of “callout”


<a href="#">Test</a>

<div class="mM">
<div class="inner">
<h1><a href="#">Test h1</a></h1>

<div class="col">
<ul>
<li><a href="#">Test Menu Item</a></li>
<li><a href="#">Test Menu Item</a></li>
<li><a href="#">Test Menu Item</a></li>
</ul>
</div>

<div class="col">
<ul>
<li><a href="#">Test Menu Item</a></li>
<li><a href="#">Test Menu Item</a></li>
<li><a href="#">Test Menu Item</a></li>
</ul>
</div>

<div class="col">
<ul>
<li><a href="#">Test Menu Item</a></li>
<li><a href="#">Test Menu Item</a></li>
<li><a href="#">Test Menu Item</a></li>
</ul>
</div>

<div class="col clear">
<h1><a href="#">Test h1</a></h1>
</div>

<div class="col clear">
<h1><a href="#">Test h1</a></h1>
</div>

<div class="col clear">
<h1><a href="#">Test h1</a></h1>
</div>

<hr class="clear" />
<div class="col_1"></div>
</div>
</div>

Toggle between Design and Code shows the code to now be:

<p><a href="#">Test</a></p>

<div class="mM">
<div class="inner">
<h1><a href="#">Test h1</a></h1>

<div class="col">
<ul>
<li><a href="#">Test Menu Item</a></li>
<li><a href="#">Test Menu Item</a></li>
<li><a href="#">Test Menu Item</a></li>
</ul>
</div>

<div class="col">
<ul>
<li><a href="#">Test Menu Item</a></li>
<li><a href="#">Test Menu Item</a></li>
<li><a href="#">Test Menu Item</a></li>
</ul>
</div>

<div class="col">
<ul>
<li><a href="#">Test Menu Item</a></li>
<li><a href="#">Test Menu Item</a></li>
<li><a href="#">Test Menu Item</a></li>
</ul>
</div>

<div class="col clear">
<h1><a href="#">Test h1</a></h1>
</div>

<div class="col clear">
<h1><a href="#">Test h1</a></h1>
</div>

<div class="col clear">
<h1><a href="#">Test h1</a></h1>
</div>

<hr class="clear" />
<div class="col_1"></div>
</div>
</div>

Notice it has wrapped the first line with

. I do not need the as it will visually break the template calling this field. Removing the added I do not toggle between Design and Code; rather, updating/saving the Content Item. Now the code shows the following for the “callout” field:
<div class="rxbodyfield">
<p><a href="#">Test</a></p>

<div class="mM">
<div class="inner">
<h1><a href="#">Test h1</a></h1>

<div class="col">
<ul>
<li><a href="#">Test Menu Item</a></li>

<li><a href="#">Test Menu Item</a></li>

<li><a href="#">Test Menu Item</a></li>
</ul>
</div>

<div class="col">
<ul>
<li><a href="#">Test Menu Item</a></li>

<li><a href="#">Test Menu Item</a></li>

<li><a href="#">Test Menu Item</a></li>
</ul>
</div>

<div class="col">
<ul>
<li><a href="#">Test Menu Item</a></li>

<li><a href="#">Test Menu Item</a></li>

<li><a href="#">Test Menu Item</a></li>
</ul>
</div>

<div class="col clear">
<h1><a href="#">Test h1</a></h1>
</div>

<div class="col clear">
<h1><a href="#">Test h1</a></h1>
</div>

<div class="col clear">
<h1><a href="#">Test h1</a></h1>
</div>
</div>
</div>
</div>

Ephox/Tidy has added

again and removed the

<hr class="clear" />

near the end.

Anyone else experiencing strange behavior from Ephox or Tidy? Am I missing a setting?

We have been troubleshooting similar issues after our upgrade.
We can no longer add <p> tags to our pages as ephox or tidy are removing them completely.
Very annoying. We want the paragraph tags.
I checked the elj_config.xml for the “encloseText” property on the htmlfilter element and it is set to true so the system should actually be adding them for us if we do not. But it is actually stripping them out.
Anyone else have any ideas?