diff --git a/ChangeLog b/ChangeLog index 166eae22b..cb4e2d288 100755 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,8 @@ $Source$ * libraries/select_lang.lib.php, libraries/Theme_Manager.class.php: Escape user input (CVE-2006-2031). * server_databases.php: Fix path to image (needs to be lower case). + * libraries/common.lib.php: Use htmlspecialchars instead of htmlentities, + it doesn't break utf-8. 2006-04-28 Michal Čihař * Documentation.html, main.php, libraries/config.default.php: Possibility diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 8ef0c59d8..e61492e7f 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2038,10 +2038,10 @@ window.parent.updateTableTitle('', ' $par_value) { - // htmlentities() only on non javascript + // htmlspecialchars() only on non javascript $par_value = substr($par_name, 0, 2) == 'on' ? $par_value - : htmlentities($par_value); + : htmlspecialchars($par_value); $tag_params_strings[] = $par_name . '="' . $par_value . '"'; }