Jump to content

preventing html comment injection


php_begins

Recommended Posts

hi,

Suppose, when a user enters something like <!--  TEST  -->  in my form field.

And later when I want to display it, how would it be possible to get rid of the html comments. Right now it displays nothing because of the comment symbols.

 

strip_tags just removes the anything b/w <>. Is there any method that would make it work?

 

Link to comment
https://forums.phpfreaks.com/topic/240657-preventing-html-comment-injection/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.