I am displaying user submitted HTML as part of a page (the user’s resume). I noticed that if the user’s HTML get’s cut off in the DB, due to character limit, when the HTML is displayed, any tags that didn’t get closed, spills over to the rest of the page.
Am I able to contain the HTML within a div? Another solution? I’m using PHP, by the way.
Thanks.
If you have one ore more unclosed tags in you HTML, your DOM becomes invalid and the consequences are unpredictable. Make sure that the submitted HTML doesn’t get cut by using a TEXT column in your DB table.