LimeSurvey API - Master branch

sanitize_helper.php

Table of Contents

Constants

FLOAT  = 32
HTML  = 8
INT  = 16
LDAP  = 64
MAGIC_QUOTES  = 0
PARANOID  = 1
SYSTEM  = 4
UTF8  = 128

Functions

nice_addslashes()  : mixed
sanitize_filename()  : mixed
Function: sanitize_filename Returns a sanitized string, typically for URLs.
beautify_filename()  : mixed
sanitize_dirname()  : mixed
Function: sanitize_dirname sanitizes a string that will be used as a directory name
sanitize_paranoid_string()  : mixed
sanitize_cquestions()  : mixed
sanitize_system_string()  : mixed
sanitize_xss_string()  : mixed
sanitize_sql_db_tablename()  : mixed
sanitize_ldap_string()  : mixed
sanitize_html_string()  : mixed
sanitize_int()  : mixed
sanitize_user()  : mixed
sanitize_userfullname()  : mixed
sanitize_labelname()  : mixed
sanitize_float()  : mixed
sanitize()  : mixed
check_paranoid_string()  : mixed
check_int()  : mixed
check_float()  : mixed
check_html_string()  : mixed
check_system_string()  : mixed
check()  : bool
sanitize_languagecode()  : mixed
sanitize_languagecodeS()  : mixed
sanitize_signedint()  : mixed
check_ip_address()  : bool
Checks the validity of IP address $ip
check_absolute_url()  : bool
Returns true if the argument is an absolute URL (either starting with schema+domain or just "/").
sanitize_alphanumeric()  : string
Remove all chars from $value that are not alphanumeric or dash or underscore

Constants

Functions

nice_addslashes()

nice_addslashes(mixed $string) : mixed
Parameters
$string : mixed

sanitize_filename()

Function: sanitize_filename Returns a sanitized string, typically for URLs.

sanitize_filename(mixed $filename[, mixed $force_lowercase = true ][, mixed $alphanumeric = false ][, mixed $beautify = true ][, mixed $directory = false ]) : mixed

Parameters: $string - The string to sanitize. $force_lowercase - Force the string to lowercase? $alphanumeric - If set to true, will remove all non-alphanumeric characters.

Parameters
$filename : mixed
$force_lowercase : mixed = true
$alphanumeric : mixed = false
$beautify : mixed = true
$directory : mixed = false

beautify_filename()

beautify_filename(string $filename) : mixed
Parameters
$filename : string

sanitize_dirname()

Function: sanitize_dirname sanitizes a string that will be used as a directory name

sanitize_dirname(mixed $string[, mixed $force_lowercase = false ][, mixed $alphanumeric = false ]) : mixed

Parameters: $string - The string to sanitize. $force_lowercase - Force the string to lowercase? $alphanumeric - If set to true, will remove all non-alphanumeric characters.

Parameters
$string : mixed
$force_lowercase : mixed = false
$alphanumeric : mixed = false

sanitize_paranoid_string()

sanitize_paranoid_string(mixed $string[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$string : mixed
$min : mixed = ''
$max : mixed = ''

sanitize_cquestions()

sanitize_cquestions(mixed $string[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$string : mixed
$min : mixed = ''
$max : mixed = ''

sanitize_system_string()

sanitize_system_string(mixed $string[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$string : mixed
$min : mixed = ''
$max : mixed = ''

sanitize_xss_string()

sanitize_xss_string(mixed $string) : mixed
Parameters
$string : mixed

sanitize_sql_db_tablename()

sanitize_sql_db_tablename(mixed $string) : mixed
Parameters
$string : mixed

sanitize_ldap_string()

sanitize_ldap_string(mixed $string[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$string : mixed
$min : mixed = ''
$max : mixed = ''

sanitize_html_string()

sanitize_html_string(mixed $string) : mixed
Parameters
$string : mixed

sanitize_int()

sanitize_int(mixed $integer[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$integer : mixed
$min : mixed = ''
$max : mixed = ''

sanitize_user()

sanitize_user(string $string) : mixed
Parameters
$string : string

sanitize_userfullname()

sanitize_userfullname(mixed $string) : mixed
Parameters
$string : mixed

sanitize_labelname()

sanitize_labelname(mixed $string) : mixed
Parameters
$string : mixed

sanitize_float()

sanitize_float(mixed $float[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$float : mixed
$min : mixed = ''
$max : mixed = ''

sanitize()

sanitize(mixed $input, mixed $flags[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$input : mixed
$flags : mixed
$min : mixed = ''
$max : mixed = ''

check_paranoid_string()

check_paranoid_string(mixed $input[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$input : mixed
$min : mixed = ''
$max : mixed = ''

check_int()

check_int(mixed $input[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$input : mixed
$min : mixed = ''
$max : mixed = ''

check_float()

check_float(mixed $input[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$input : mixed
$min : mixed = ''
$max : mixed = ''

check_html_string()

check_html_string(mixed $input[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$input : mixed
$min : mixed = ''
$max : mixed = ''

check_system_string()

check_system_string(mixed $input[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$input : mixed
$min : mixed = ''
$max : mixed = ''

check()

check( $input,  $flags[, string $min = '' ][, string $max = '' ]) : bool
Parameters
$input :
$flags :
$min : string = ''
$max : string = ''
Tags
throws
Exception
Return values
bool

sanitize_languagecode()

sanitize_languagecode(mixed $codetosanitize) : mixed
Parameters
$codetosanitize : mixed

sanitize_languagecodeS()

sanitize_languagecodeS(string $codestringtosanitize) : mixed
Parameters
$codestringtosanitize : string

sanitize_signedint()

sanitize_signedint(mixed $integer[, mixed $min = '' ][, mixed $max = '' ]) : mixed
Parameters
$integer : mixed
$min : mixed = ''
$max : mixed = ''

check_ip_address()

Checks the validity of IP address $ip

check_ip_address(string $ip) : bool
Parameters
$ip : string

to check

Return values
bool

true if the $ip is a valid IP address

check_absolute_url()

Returns true if the argument is an absolute URL (either starting with schema+domain or just "/").

check_absolute_url(string $string) : bool
Parameters
$string : string
Return values
bool

sanitize_alphanumeric()

Remove all chars from $value that are not alphanumeric or dash or underscore

sanitize_alphanumeric(string $value) : string
Parameters
$value : string
Return values
string

        
On this page

Search results