okay,
I’m seeing where you’re problem is now. It is because you are trying to nest <a>
elements. This is not allowed in HTML
your code has this
<a href='<?php echo get_permalink($post->ID); ?>' >
... all of your other code .....
</a>
When you add a link into the text area you end up with
<a href='link to the post' >
<a href="some other link">some other text</a>
</a>
This is not allowed. The browser is closing the first link before the start on the second. This is causing your tags to be improperly nested.