From #471184: Reconcile Drupal's input security functions with PHP filter_*:
- filter_xss*()
- check_plain()
- check_url()
- valid_email_address()
- valid_url()
- drupal_validate_utf8()
- drupal_valid_http_host()
Similar, so potentially also:
- drupal_query_string_encode()
- _fix_gpc_magic()
- _fix_gpc_magic_files()
- drupal_urlencode()
- drupal_valid_token()
Note that
- check_file()
shares the same prefix, but does not really belong into that list.
Comments
Comment #1
agentrickardBased on Damien's comments in #471184: Reconcile Drupal's input security functions with PHP filter_*, I think it is important to label these as Drupal-specific functions, since they either improve existing PHP filter_ functions or create ones that do not exist.
So that suggests to me:
So my quick take is that we have three families of functions:
-- output functions which sanitize data before rendering. (May also be named drupal_print or drupal_sanitize).
-- validate functions which verify data during processing.
-- fix / secure functions which correct potential security holes in PHP server settings.
I can also see an argument for removing the
drupal_prefix from these functions if we can agree on the family naming conventions.Comment #2
mfer commentedComment #3
ianthomas_ukThis was done as the functionality was moved to classes