I am working on a forum script. Members will post the code to the topics so the html tags should display them, here I have tried by using htmlspecialchars function and also by using htmlentities(). These are working and displaying the html tags to the screen. Now I don’t want the links also to be changed. These function changes all the tags.
Is there a way to restrict these function and not to change the <a href = > Tag ?
Or any other better way of doing this. I am not so comfortable with regular expression.
thanks