HTML vs. Plain Text Input

From: Date: Fri, 07 May 2004 08:33:28 +0000
Subject: HTML vs. Plain Text Input
Groups: php.general 
Request: Send a blank email to php-general+get-185594@lists.php.net to get a copy of this message
Hey, I was wondering if anyone knows of any easy ways to detect for HTML input. I have a textarea box that I want users to be able to input either plain text or HTML code. I will later display this input data, so if the user input plain text then I will replace newline characters (\r\n, \n, \r) with <br> tags, but if they input HTML code I don't want to format it before displaying it. Basically is there an easy way to detect HTML code in inputs? If you have any suggestions, please let me know. Thanks, Matt http://sweetphp.com

« previous php.general (#185594) next »