X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fmodules%2Flang_change.mod;h=41ea1dba53b985142f7955e1ef47b63121a5dd5f;hb=22387c8d44f3ab104db6e19180d3775a45762359;hp=f1d2e5deb15abb38dced453ba608789f528b8612;hpb=4b4abf93a9624311afef0c385023724ee46a2b60;p=squirrelmail.git diff --git a/plugins/squirrelspell/modules/lang_change.mod b/plugins/squirrelspell/modules/lang_change.mod index f1d2e5de..41ea1dba 100644 --- a/plugins/squirrelspell/modules/lang_change.mod +++ b/plugins/squirrelspell/modules/lang_change.mod @@ -9,13 +9,16 @@ * for the user. Called after LANG_SETUP module. * * @author Konstantin Riabitsev - * @copyright © 1999-2005 The SquirrelMail Project Team + * @copyright 1999-2017 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package plugins * @subpackage squirrelspell */ +sqgetGlobalVar('smtoken', $submitted_token, SQ_POST, ''); +sm_validate_security_token($submitted_token, -1, TRUE); + global $SQSPELL_APP_DEFAULT; if (! sqgetGlobalVar('use_langs',$use_langs,SQ_POST)) { @@ -39,27 +42,25 @@ foreach ($use_langs as $lang) { if (sizeof($new_langs)>1) { $dsp_string = ''; foreach( $new_langs as $a) { - $dsp_string .= _(htmlspecialchars(trim($a))) . ', '; + $dsp_string .= _(sm_encode_html_special_chars(trim($a))) . _(", "); } // remove last comma and space $dsp_string = substr( $dsp_string, 0, -2 ); - /** - * i18n: first %s is comma separated list of languages, second %s - default language. - * Language names are translated, if they are present in squirrelmail.po file. - * make sure that you don't use html codes in language name translations - */ + // i18n: first %s is comma separated list of languages, second %s - default language. + // Language names are translated, if they are present in squirrelmail.po file. + // make sure that you don't use html codes in language name translations $msg = '

' . sprintf(_("Settings adjusted to: %s with %s as default dictionary."), - ''.htmlspecialchars($dsp_string).'', - ''.htmlspecialchars(_($lang_default)).'') + ''.sm_encode_html_special_chars($dsp_string).'', + ''.sm_encode_html_special_chars(_($lang_default)).'') . '

'; } else { /** * Only one dictionary is selected. */ $msg = '

' - . sprintf(_("Using %s dictionary for spellcheck." ), ''.htmlspecialchars(_($new_langs[0])).'') + . sprintf(_("Using %s dictionary for spellcheck." ), ''.sm_encode_html_special_chars(_($new_langs[0])).'') . '

'; } @@ -76,4 +77,3 @@ sqspell_makePage(_("International Dictionaries Preferences Updated"), * End: * vim: syntax=php */ -?> \ No newline at end of file