I was looking for a way to prevent display html tags in comments
for example if user put a html tags like <br> or <hr> dont display a horizontal line or line break just show as it was(print out put: <br> or <hr>)
I was looking for a way to prevent display html tags in comments for
Share
You should use
htmlspecialchars()to prevent this. This will also prevent XSS attacks.http://codepad.viper-7.com/w5U8qs