Q: php links added to code This code is from view-source in Chrome:
<div class='pedSpouse'>Relation med <a class='familylink' file='157'     pers='24351162'><strong>KARL EMRIK Jakobsson</strong> f.    1897</div></div><div> <img id='pedMore' src='cmn/prg/pics/hpil.png'></div></div></div>

In inspect the img is embedded within a copy of the previous a tag:
<div><a class='familylink' file='157' pers='24351162'><img id='pedMore' src='cmn/prg/pics/hpil.png'></div>

The same thing occurs in two other places. 
With other data the code is as expected.
Same thing happens in Edge.
I have no idea where the extra code comes from.

A: Your HTML is broken.  Examine its structure:
<div class='pedSpouse'>
  Relation med 
  <a class='familylink' file='157' pers='24351162'>
    <strong>
      KARL EMRIK Jakobsson
    </strong>
    f. 1897
  <!-- You didn't close the "a" element -->
</div>
</div> <!-- You close a "div" element that was never opened -->
<div>
  <img id='pedMore' src='cmn/prg/pics/hpil.png'>
</div>
</div> <!-- You close a "div" element that was never opened -->
</div> <!-- You close a "div" element that was never opened -->

The rendered HTML is different from the page source because the page source is invalid and the browser is doing its best to make sense of it.  Use well-formed HTML for more control over how the HTML is interpreted by the browser.
Hint: When your HTML isn't doing what you expect, the very first step is to validate it.  The runtime behavior of invalid code is always undefined.
