DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

PHP : Parsea HTML Inyectado / Parser HTML Inject

  • submit to reddit
        Parsea HTML Inyectado. Esto es útil cuando nos escriben código HTML o Javascript maligno en un texarea. Para más información / Parser HTML inject. This is good when we write HTML code or bad javascript on a textarea. For more info (sorry english)
Código fuente / Source code : 

function parsearHTMLInjectado($texto)
	return nl2br( htmlentities($texto) );