koolkat67 Posted April 3, 2007 Share Posted April 3, 2007 alright, last week I posted a link to my site where people can leave comments and some low-life decided to post links on that page. Is there someway to filter out links? I dont really want to use the htmlspecialchars() or the htmlentities() to simply disable them, I want to block them altogether. Maybe some way to filter out "www" or something? Link to comment https://forums.phpfreaks.com/topic/45431-filter-links-out-of-comments/ Share on other sites More sharing options...
only one Posted April 3, 2007 Share Posted April 3, 2007 just do it like bbcode $bbcode = array('www.', '.com', 'www', 'com'); $html = array('', '', '', ''); $output = preg_replace($bbcode, $html, $output); please edit bold bits, and you might want to add more things in the bbcode array, like http:// .net net. i could go on all day Link to comment https://forums.phpfreaks.com/topic/45431-filter-links-out-of-comments/#findComment-220613 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.