dropfaith Posted October 12, 2008 Share Posted October 12, 2008 i already have something like this on the server side with php but im trying to make it so a user cant enter things like "> as a name as it messes up my link format to get to profiles.. any html does this so i would love to block out all html and only allow names to be letter number combinations Quote Link to comment Share on other sites More sharing options...
AndyB Posted October 12, 2008 Share Posted October 12, 2008 I wouldn't do it with javascript because that might be off. Process it server-side and do your validation there. A simple regex check would do. Quote Link to comment Share on other sites More sharing options...
dropfaith Posted October 12, 2008 Author Share Posted October 12, 2008 any ideas on where i can find a good tutorial for this? Quote Link to comment Share on other sites More sharing options...
Adam Posted October 12, 2008 Share Posted October 12, 2008 As Andy said I wouldn't rely on it for security... But a quick search on google found: http://www.google.co.uk/search?q=javascript+strip+html+tags Adam Quote Link to comment Share on other sites More sharing options...
AndyB Posted October 12, 2008 Share Posted October 12, 2008 any ideas on where i can find a good tutorial for this? Google's full of them (client side and server side) php freaks has a board for regex help. This php snippet -> http://www.phpbuilder.com/board/showthread.php?t=10314920 probably answers your original quest Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.