My mission is to explore blogs and get their latest post. Now I have script that do the task and store the content as `html` in database.  

Everything works properly except template inference. Means that if the content html code for example has an extra `</div>` or forget to close a tag, it will ruin my entire page. 

**Question:** Is there any way to limit the external content to one division and therefore if external code had some problems, just influence template of that `div` box not entire template? 

[Link to correct template](http://yushia.blogma.net/541064/%D8%AF%D8%A7%D9%86%D9%84%D9%88%D8%AF-%D8%A2%D9%87%D9%86%DA%AF-%D8%AC%D8%AF%DB%8C%D8%AF-%D9%86%D8%A7%D8%B5%D8%B1-%D8%B5%D8%AF%D8%B1-%D9%88-%D9%85%D8%B1%D8%AA%D8%B6%DB%8C-%D8%B2%D8%B1%D9%84%DA%A9%DB%8C-%D9%86%D8%A7%D9%85-%D9%82%D8%B5%D9%87-%D9%BE%D8%B1-%D8%A7%D8%B2-%D8%AE%D9%88%D9%86)  

[Link to damaged template](http://nasimroooz.blogma.net/544753/%D8%AD%D9%85%D9%84%D9%87-%D8%B1%D9%88%D8%B3%DB%8C%D9%87-%D8%A8%D9%87-%D8%AF%D8%A7%D8%B9%D8%B4)

Thanks in advance