Re: htmlspecialchars but allow text formatting?

From: Date: Thu, 30 Aug 2001 00:49:52 +0000
Subject: Re: htmlspecialchars but allow text formatting?
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-9121@lists.php.net to get a copy of this message
Mike, Try using preg_replace... ----- Original Message ----- From: "Mike Flynn" <mike@mikeflynn.net> To: <php-windows@lists.php.net> Sent: Wednesday, August 29, 2001 11:37 PM Subject: [PHP-WIN] htmlspecialchars but allow text formatting? > Hey all, > > Here's something I've wanted to do in the past, but being unable to figure > it out just worked around it. > > Does anyone know of a good, secure solution to strip html characters like > htmlspecialchars() does, for security sake and proper page viewing, but > allow text formatting tags, like <b>, <i>, <u>, <big>, <small>, > <font>, etc? > > I'd like to allow people to input large text articles via web forms > (textareas), but still allow some level of attractiveness to the output -- > by allowing them to format the text with HTML tags. > > Any ideas? > > -Mike > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.windows (#9121) next »