PHP FILTER_UNSAFE_RAW Filter

Definition and Usage

FILTER_UNSAFE_RAW filter does not perform any filtering, removing, or encoding of special characters.

This filter removes data that could potentially harm the application. It is used to remove tags and delete or encode unnecessary characters.

If no flags are specified, the filter has no action.

  • Name: "unsafe_raw"
  • ID-number: 516

Possible Options or Flags:

  • FILTER_FLAG_STRIP_LOW - Remove characters with ASCII values below 32
  • FILTER_FLAG_STRIP_HIGH - Remove characters with ASCII values above 32
  • FILTER_FLAG_ENCODE_LOW - Encode characters with ASCII values below 32
  • FILTER_FLAG_ENCODE_HIGH - Encode characters with ASCII values above 32
  • FILTER_FLAG_ENCODE_AMP - Encode & character as &