summaryrefslogtreecommitdiff
path: root/www/gpg.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/gpg.php')
-rw-r--r--www/gpg.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/www/gpg.php b/www/gpg.php
index 70db756..5a73e32 100644
--- a/www/gpg.php
+++ b/www/gpg.php
@@ -322,7 +322,7 @@ function normalizeName($name) {
//Enhanced version of SanitizeHTML which is charset-aware for UTF-8 + ISO-8859-1
$charset = mb_detect_encoding($name, "auto, ISO-8859-1, UTF-8", true);
- if(false === $charset) {
+ if(false === $charset || !in_array($charset, array('UTF-8', 'ISO-8859-1', 'ISO-8859-15', 'cp1251', 'cp1252', 'KOI8-R', 'BIG5', 'GB2312', 'BIG5-HKSCS', 'Shift_JIS', 'EUC-JP')) ) {
$charset = 'ISO-8859-1';
}
$name = htmlentities($name, ENT_QUOTES, $charset, false);