phpSensei Posted August 2, 2007 Share Posted August 2, 2007 How would you detect an html tag or any html in a textarea when someone posts something? Just like if I had textarea, and I posted something, I wouldnt allow to have any html in my text? Link to comment https://forums.phpfreaks.com/topic/63030-detect-html-in-a-text/ Share on other sites More sharing options...
wildteen88 Posted August 2, 2007 Share Posted August 2, 2007 Use strip_html tags function. this function will strip all html tags posted. Link to comment https://forums.phpfreaks.com/topic/63030-detect-html-in-a-text/#findComment-313898 Share on other sites More sharing options...
HaLo2FrEeEk Posted August 2, 2007 Share Posted August 2, 2007 Or if you simply wanted the tags to display as plain text, you could just use htmlentities, or if you wanted to convert it to bbcode, you could use preg_replace. Link to comment https://forums.phpfreaks.com/topic/63030-detect-html-in-a-text/#findComment-313913 Share on other sites More sharing options...
phpSensei Posted August 3, 2007 Author Share Posted August 3, 2007 Thankyou Both... Link to comment https://forums.phpfreaks.com/topic/63030-detect-html-in-a-text/#findComment-314968 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.