Fixed #8043 It didn't like one of the french characters being saved in the config so it would rollback the config and not allow you to enable mobile clients. Added an html entities to replace it with safe characters. Also added some escapes when it tried to print certain words using a ['] and terminating a string in javascript for the ipsec_status page. This is a possibly a potential problem for multiple pages in French.

This commit is contained in:
Stephen Jones 2017-11-03 16:05:12 -05:00
parent 8c2831e141
commit 46b9efddca
2 changed files with 3 additions and 3 deletions

View File

@ -299,7 +299,7 @@ function sprint_info_box($msg, $class="alert-warning", $btnname = "close", $btnt
if (strpos($class, "alert-") !== 0) {
$class = 'alert-' . $class;
}
$msg = addslashes($msg);
$msg = '<div class="pull-left">' . $msg . '</div>';
if ($btnname === "close") {

View File

@ -240,10 +240,11 @@ if ($_POST['save']) {
if ($pconfig['enable']) {
$client['enable'] = true;
}
if (!empty($pconfig['user_source'])) {
$client['user_source'] = implode(",", $pconfig['user_source']);
$client['user_source'] = htmlentities($client['user_source'],ENT_COMPAT,'UTF-8');
}
$client['group_source'] = $pconfig['group_source'];
if ($pconfig['pool_enable']) {
@ -291,7 +292,6 @@ if ($_POST['save']) {
if ($pconfig['login_banner_enable']) {
$client['login_banner'] = $pconfig['login_banner'];
}
$a_client = $client;
write_config(gettext("Saved IPsec Mobile Clients configuration."));