dynamic - How to protect layout from malformatted html content on a generated webpage? -


i have container layout of webpage works this:

<html> #header# <div class="content_container"> #content inserted here# </div> #footer# </html> 

if content has div not closed or closes div without being opened, content_container's div , layout gets messed up.

how situation avoided or solved?

hy,

from found on net, parse fragment html document using dom loadhtml function, spit out again html. fix html well-formedness errors.

or use tidy extension php5

http://www.php.net/tidy


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -