You are here

function tb_sanitize in TinyBrowser 7

File

tinybrowser/config_tinybrowser.php, line 108

Code

function tb_sanitize($input) {
  if (is_array($input)) {
    foreach ($input as $k => $i) {
      $output[$k] = tb_sanitize($i);
    }
  }
  else {
    $input = htmlspecialchars($input, ENT_QUOTES);
    if (get_magic_quotes_gpc()) {
      $input = stripslashes($input);
    }
    $output = strip_tags($input);
  }
  return $output;
}