Use htmlspecialchars instead of htmlentities, it doesn't break utf-8.

This commit is contained in:
Michal Čihař
2006-05-02 13:28:35 +00:00
parent d1ed5a5b1b
commit ed84a68f63
2 changed files with 4 additions and 2 deletions

View File

@@ -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ř <michal@cihar.com>
* Documentation.html, main.php, libraries/config.default.php: Possibility

View File

@@ -2038,10 +2038,10 @@ window.parent.updateTableTitle('<?php echo $uni_tbl; ?>', '<?php echo PMA_jsForm
$tag_params_strings = array();
foreach ($tag_params as $par_name => $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 . '"';
}