Over a million developers have joined DZone.

PHP : Parsea HTML Inyectado / Parser HTML Inject

DZone's Guide to

PHP : Parsea HTML Inyectado / Parser HTML Inject

Free Resource
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) );	

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}