Does using the converting input from HTML forms into htmlentities protect attacks invoving JavaScrip

Posted by racl101 on Stack Overflow See other posts from Stack Overflow or by racl101
Published on 2010-04-13T22:57:59Z Indexed on 2010/04/13 23:13 UTC
Read the original article Hit count: 369

Filed under:
|
|
|
|

Hi everyone,

I was wondering if converting POST input from an HTML form into html entities, (via the PHP function htmlentities() or using the FILTER_SANITIZE_SPECIAL_CHARS constant in tandem with the filter_input() PHP function ), will help defend against any attacks where a user attempts to insert any JavaScript code inside the form field or if there's any other PHP based function or tactic I should employ to create a safe HTML form experience?

Sorry for the loaded run-on sentence question but that's the best I could word it in a hurry.

Any responses would be greatly appreciated and thanks to all in advance.

racl101

© Stack Overflow or respective owner

Related posts about php

Related posts about form