PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a script that allows users to put in their own articles. The problem is that sometimes users put in bad code and the out put ends up looking like this:
I think it has something to do with the image tag not being closed correctly after the "alt" property.
Any ideas what I need to do to the $content variable before echoing it to prevent this from happening?
<td width="100%">
<div style="margin-left: 1%; margin-top: 2%; margin-bottom: 2%;">
<span style="font-size: 10pt;">
<p><img bigimg="" src="http://static.ibnlive.com/pix/sitepix/09_2006/knot_248.jpg" alt="WHERE IS THE LOVE: The wife’s message read - You are the most despicable, deceitful people I have ever met." title="WHERE IS THE LOVE: The wife&r... <a href='article.php?article=65'>(More)</a>
</span>
</div>
</td>
</tr>
<tr>
<td>
I didn't say you should add another call to htmlentities(), did I? I just speculated that something like htmlentities already has been used incorrectly.
But without seeing the actual code it's all wild guessing.