PHP FILTER_UNSAFE_RAWFilters


PHP Filter 参考手册Complete PHP Filter Reference Manual

Definition and Usage

The FILTER_UNSAFE_RAW filter does not perform any filtering; it removes or encodes special characters.

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

If no flags are specified, the filter does nothing.

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

Possible flags:

  • FILTER_FLAG_STRIP_LOW - Strip characters with ASCII value below 32
  • FILTER_FLAG_STRIP_HIGH - Strip characters with ASCII value above 32
  • FILTER_FLAG_ENCODE_LOW - Encode characters with ASCII value below 32
  • FILTER_FLAG_ENCODE_HIGH - Encode characters with ASCII value above 32
  • FILTER_FLAG_ENCODE_AMP - Encode the & character as &

PHP Filter 参考手册Complete PHP Filter Reference Manual Other Extensions