php - Auto close an open html tag

Wednesday, November 4, 2015

I've created a blog site where everyone with an account can create his own blog. The new blog post will be saved in a MYSQL database. My problem is that if the user forgot to close an HTML tag, the whole site is displayed wrong.



Example:



<p><b>This is Bold</p>
<p>This must be displayed normal</p>


How can I fix this with Javascript or PHP?

0 comments:

Post a Comment