I have a problem with a plugin I developed that registers a shortcode. The shortcode returns a string with valid HTML but some themes seems to manipulate the HTML returned by the shortcode, and I really can't understand what is the reason.
For example, this is the correct output of my shortcode:
<div class="tile">
<a>
<img src="0.jpg" />
<div class="caption">
<p>Kate</p>
</div>
</a>
</div>
and this is the output I get with some theme:
<div class="tile">
<a>
<img src="0.jpg" />
<div class="caption">
<p>Kate</p>
</div>
</a>
</div>
<p></p></a></div>
As you can see there is some extra tag after the closing of the 'caption' DIV.
Maybe these themes apply some kind of HTML validation/sanitization?