<nav id="toc" class="toc" data-loaded="false"><div id="toctitle"><h2>Contents</h2><span class="toctoggle">[
show]</span></div>
</nav><h2><span class="mw-headline" id="Disclaimer"> Disclaimer </span></h2>
<p>
If this is not the right forum, please direct me. Since this is about wikia inserting a (perhaps strict compliant) <p> tag for a template typed as "InfoIcon", I figured it was portability</p>
<h2><span class="mw-headline" id="Problem_Description"> Problem Description </span></h2>
<p>It's a one-liner now, to reduce the possiblity of whitespace,
but aligned here for clarity.
Actual code
</p>
<includeonly>
{{#switch:{{{pos}}}
| right-of =
<span class="dpe-icon dpe-icon-right-of" style="padding: 0 0.25ex 0 0;">
[[File:{{{1}}}.png|frameless|middle|link=|{{{size|16px}}}]]
</span>
| in-between =
<span class="dpe-icon dpe-icon-in-between" style="padding: 0 0.25ex 0 0.25ex;">
[[File:{{{1}}}.png|frameless|middle|link=|{{{size|16px}}}]]
</span>
| #default =
<span class="dpe-icon dpe-icon-left-of" style="padding: 0 0 0 0.25ex;">
[[File:{{{1}}}.png|frameless|middle|link=|{{{size|16px}}}]]
</span>
}}
</includeonly>
<h3><span class="mw-headline" id="Expected_result"> Expected result </span></h3>
<p>The following:
</p>
{|
|-
|67{{Icon|Goldcoins|pos=right-of}}
|}
<p>Should result in the following for the table data tag:
</p>
<td>
67<span class="dpe-icon dpe-icon-right-of" style="padding: 0 0.25ex 0 0;">
<img class="" width="16" height="16" superfluous-js="skipped" />
</span>
</td>
<h2><span class="mw-headline" id="Actual_result"> Actual result </span></h2>
<figure class="article-thumb tleft show-info-icon" style="width: 180px">

<figcaption>
<p class="caption">Ghost appearance of </p><p> tag.</p> </figcaption></figure><h2><span class="mw-headline" id="Final_remarks"> Final remarks </span></h2>
If this is tidyhtml or some variant doing it - then do it right and encapsulate the entire table data in one p tag.