I am using Drupal 7 with wysiwyg (7.x-2.0)module and CK editor 3.5.3.6655. I added an image in a block with link and the CK editor code is
<p>
<a class="thickbox" href="example.com"> [[{"type":"media","view_mode":"media_original","fid":"751","attributes":{"alt":"contact","class":"media-image","typeof":"foaf:Image"}}]]</a>
</p>
But Drupal is adding some divs around the img tag and the resulting code is
<div id="block-block-11" class="block block-block">
<div class="content">
<p>
<a class="thickbox" href="example.com">
<div class="field field-name-file field-type-file field-label-hidden">
<div class="field-items">
<div class="field-item even">
<span id="styles-0-0" class="styles file-styles original">
<img typeof="foaf:Image" src="path to image.jpg" alt="contact" />
</span>
</div>
</div>
</div>
</a>
</p>
</div>
</div>
Then I got the W3C error document type does not allow element "div" here; missing one of "button", "map", "object", "ins", "del", "noscript" start-tag as div is not allowed inside p and a. How can I solve this?
I added div instead of p but no use.