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 Link to comment https://forums.phpfreaks.com/topic/128050-block-html-from-form-submit/ 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. Link to comment https://forums.phpfreaks.com/topic/128050-block-html-from-form-submit/#findComment-663073 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? Link to comment https://forums.phpfreaks.com/topic/128050-block-html-from-form-submit/#findComment-663076 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 Link to comment https://forums.phpfreaks.com/topic/128050-block-html-from-form-submit/#findComment-663080 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 Link to comment https://forums.phpfreaks.com/topic/128050-block-html-from-form-submit/#findComment-663081 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.