1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00
freebsd-ports/mail/squirrelmail/files/patch-functions__i18n.php
Steve Wills d3e3022b8e mail/squirrelmail: Update to 20170705
While here, give maintainership to submitter

PR:		219801
Submitted by:	Zsolt Udvari <uzsolt@uzsolt.hu>
MFH:		2017Q3
Security:	e1de77e8-c45e-48d7-8866-5a6f943046de
2017-08-22 17:25:09 +00:00

33 lines
1.4 KiB
PHP

--- functions/i18n.php.orig 2017-07-05 11:28:23 UTC
+++ functions/i18n.php
@@ -159,15 +159,17 @@ function sq_setlocale($category,$locale)
}
/**
- * Converts string from given charset to charset, that can be displayed by user translation.
+ * Converts a string from the given $charset to a character set that
+ * can be displayed by the current user interface language (translation)
*
- * Function by default returns html encoded strings, if translation uses different encoding.
+ * Function by default returns html encoded strings if translation uses
+ * different encoding.
* If Japanese translation is used - function returns string converted to euc-jp
* If $charset is not supported - function returns unconverted string.
*
* sanitizing of html tags is also done by this function.
*
- * @param string $charset
+ * @param string $charset The charset of the incoming string
* @param string $string Text to be decoded
* @param boolean $force_decode converts string to html without $charset!=$default_charset check.
* Argument is available since 1.4.5 and 1.5.1.
@@ -184,7 +186,7 @@ function charset_decode ($charset, $stri
}
/* All HTML special characters are 7 bit and can be replaced first */
- if (! $save_html) $string = sm_encode_html_special_chars ($string);
+ if (! $save_html) $string = sm_encode_html_special_chars($string, ENT_COMPAT, $charset);
$charset = strtolower($charset);
set_my_charset();