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

07.23.2007
| 7347 views |
  • 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 www.php.net / Parser HTML inject. This is good when we write HTML code or bad javascript on a textarea. For more info www.php.net (sorry english)
Código fuente / Source code : 

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