title: wordpress nextgen gallery stray </p>
body: <p>Hello i am updating a WordPress site that was riddled with errors (over 1000...-'-) now i have gotten it down to 15 or so however one page has 105 errors and they are all caused by a stray p tag that is being generated after every image here's what the code is being outputted as</p>
  
  <pre><code>&lt;div id="ngg-image-40" class="ngg-gallery-thumbnail-box"  &gt;
       &lt;div class="ngg-gallery-thumbnail" &gt;
            &lt;a href="a link" title="the title" class="shutterset_set_5" &gt;&lt;br /&gt;
                 &lt;img title="01596-01_1" alt="01596-01_1" src="the src" width="100" height="75" /&gt;&lt;br /&gt;
           &lt;/a&gt;
       &lt;/div&gt;
  &lt;/p&gt;&lt;/div&gt;
  </code></pre>
  
  <p>As you can see there is a p tag there for no reason, I've tried Google but got no one with a solution to this problem, I've tried looking through all the php files for the nextgen gallery and couldn't figure it out the actual code that outputs the gallery is below.</p>
  
  <pre><code>&lt;div id="ngg-image-&lt;?php echo $image-&gt;pid ?&gt;" class="ngg-gallery-thumbnail-box" &lt;?php echo $image-&gt;style ?&gt; &gt;
  &lt;div class="ngg-gallery-thumbnail" &gt;
      &lt;a href="&lt;?php echo $image-&gt;imageURL ?&gt;" title="&lt;?php echo $image-&gt;description ?&gt;" &lt;?php echo $image-&gt;thumbcode ?&gt; &gt;
          &lt;?php if ( !$image-&gt;hidden ) { ?&gt;
          &lt;img title="&lt;?php echo $image-&gt;alttext ?&gt;" alt="&lt;?php echo $image-&gt;alttext ?&gt;" src="&lt;?php echo $image-&gt;thumbnailURL ?&gt;" &lt;?php echo $image-&gt;size ?&gt; /&gt;
          &lt;?php } ?&gt;
      &lt;/a&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Again as you can see there is no reference to the p tag in the above. Any and all help is appreciated.</p>