htmlentities, htmlspecialchars and nl2br
Posted: Fri Jul 07, 2006 10:21 am
I want to display text that was inserted on the database by users...
It has to be safe and dispplay the endlines and stuff...
i guess this has been talked about before plents of times.... just tell me if this is the right order:
thanks
It has to be safe and dispplay the endlines and stuff...
i guess this has been talked about before plents of times.... just tell me if this is the right order:
Code: Select all
echo nl2br( htmlspecialchars( htmlentities( $text ) ) );