Hi, I'm wanting to protect all inputs for sending a plain text email, in a common routine.
Have just found POSIX [:print:] which I thought looked useful. I didn't want to use htmlentities(); because it's a plain text email. Would this protect me from anyone sending spam though this? $raw = stripslashes($raw); $raw = preg_replace("/(content-type|bcc:|cc:|onload|onclick)/i", "DELETED", $raw); $raw = strip_tags($raw); $raw = preg_replace("/[^[:print:]]/", " ", $raw); $raw = substr($raw, 0, 500); $raw = trim($raw); Or, should I use: $raw = htmlentities($raw, ENT_NOQUOTES); The email address would obviously be different. This would cover just the name, subject and message. I don't need newlines etc. Thanks, Bob Exton. Community email addresses: Post message: php-list@yahoogroups.com Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/php-list/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/