On a new site I'm building, I have three types of text input forms:
1: Should allow plain text only, no code at all
2: Should allow basic HTML (specific tags), but no scripts
3: Should allow client-side scripts, but not server-side scripts
However, I'm not sure about how to do this in such a way as to make it truly secure.
How can I filter these fields out to make absolutely sure that users are not putting disallowed things in the text boxes?
It is very important, because some of the inputs will be used later in ways that could allow specially designed php code to execute, and some of them will be written to files, which somebody might try to execute.
Search key so I can find this later: GMSOVHOFMRM
1: Should allow plain text only, no code at all
2: Should allow basic HTML (specific tags), but no scripts
3: Should allow client-side scripts, but not server-side scripts
However, I'm not sure about how to do this in such a way as to make it truly secure.
How can I filter these fields out to make absolutely sure that users are not putting disallowed things in the text boxes?
It is very important, because some of the inputs will be used later in ways that could allow specially designed php code to execute, and some of them will be written to files, which somebody might try to execute.
Search key so I can find this later: GMSOVHOFMRM
