2009-06-08 Esteban Sanchez <estebans@artica.es>
* include/functions.php: Added encoding checking on safe_input(). Fixes #2797399. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@1731 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
626308ba6f
commit
7225a9cf5a
|
@ -1,3 +1,8 @@
|
||||||
|
2009-06-08 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
|
* include/functions.php: Added encoding checking on safe_input().
|
||||||
|
Fixes #2797399.
|
||||||
|
|
||||||
2009-06-08 Esteban Sanchez <estebans@artica.es>
|
2009-06-08 Esteban Sanchez <estebans@artica.es>
|
||||||
|
|
||||||
* godmode/reporting/reporting_builder.php: Replaced SQL with pandora
|
* godmode/reporting/reporting_builder.php: Replaced SQL with pandora
|
||||||
|
|
|
@ -41,7 +41,9 @@ function safe_input ($value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version_compare (PHP_VERSION, '5.2.3') === 1) {
|
if (version_compare (PHP_VERSION, '5.2.3') === 1) {
|
||||||
return htmlentities (utf8_encode ($value), ENT_QUOTES, "UTF-8", false);
|
if (! mb_check_encoding ($value, 'UTF-8'))
|
||||||
|
$value = utf8_encode ($value);
|
||||||
|
return htmlentities ($value, ENT_QUOTES, "UTF-8", false);
|
||||||
} else {
|
} else {
|
||||||
$translation_table = get_html_translation_table (HTML_ENTITIES, ENT_QUOTES);
|
$translation_table = get_html_translation_table (HTML_ENTITIES, ENT_QUOTES);
|
||||||
$translation_table[chr(38)] = '&';
|
$translation_table[chr(38)] = '&';
|
||||||
|
|
Loading…
Reference in New Issue