real_illusions Posted August 23, 2006 Share Posted August 23, 2006 from posted in an email form and really screwing up a websitehow do you do it?i've already got an email form in place, and a php script that builds and processes the form..but it allows html to be sent..i dont want it to..and to prevent any kind of scripting that can cause harm. Link to comment Share on other sites More sharing options...
aspnetguy Posted August 23, 2006 Share Posted August 23, 2006 if it isa beening sent as an email how can it mess up the web site?Use 2 RegExp the first one to change <br> to \n and then another one to remove all html and scripting tags Link to comment Share on other sites More sharing options...
Guest Jake Posted August 23, 2006 Share Posted August 23, 2006 $email = (set this to the e-mail's content);$email = htmlspecialchars($email); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now