i used htmlspecialchars to clean site comments, it’s change <> to html special character. but i also need to put some links in comments, same like as here at SO.
i think some thing like perg_replace can make a exception for htmlspecialchars, for example to hide [LINK]<a href="...">...</a>[/LINK] from htmlspecialchars. how i can make it in php? or what’s a better way to do that?
i used htmlspecialchars to clean site comments, it’s change <> to html special character.
Share
you can use this code: