Jump to content

Javascript and input forms


-Karl-

Recommended Posts

Alternatively you can use htmlentities()

 

The difference is that strip tags simply removes all tags in a string, while html entities will turn the html into their respective entities (click the link for more info on what exactly entities are.)

 

so if someone put in

<script> // imma h4x0r j00 </script>

strip tags would make it look like

//imma h4xor j00

 

while html entities will make it look like

<script> // imma h4x0r j00 </script>

but that won't execute, it will just output to the page

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.