/src/XSSFilter.class.php

Description

Simple configurable data filter.

Note that it is not perfect but should provide a good starting point for filtering input.

LICENSE: LGPLv3+

Example:

  1.  // The params for XSSFilter are: remove_html, remove_javascript,
  2.  //     escape_html, urlencode_html, extended_return
  3.  // For more information on what each does see the code docs in the class
  4.  
  5.  $f new XSSFilter(TrueTrueFalseTrueTrue);
  6.  $safer $f->filter($_GET);
  7.  
  8.  $f new XSSFilter(TrueTrueFalseTrueTrue);
  9.  $result $f->filter($input);
  10.  if ($result->changes{
  11.      print('Your input has been modified');
  12.  }
  13.  return $result->data;

Classes
Class Description
ExtendedResponseArray Array wrapper for safe arrays.
ExtendedResponseString String wrapper for safer strings.
XSSFilter Configurable XSSFilter for use by developers.

Documentation generated on Mon, 01 Nov 2010 10:59:02 -0400 by phpDocumentor 1.4.3