From d865241eddda66e39cea4e1408171f83d593b3d2 Mon Sep 17 00:00:00 2001 From: jim-p Date: Thu, 6 Jan 2011 13:46:13 -0500 Subject: Don't run mb_convert_encoding on descr field, it's cdata protected in the config now and this just causes some characters to be lost on input. Ticket #1168 --- etc/inc/easyrule.inc | 2 +- usr/local/www/firewall_aliases_edit.php | 4 ++-- usr/local/www/interfaces_groups_edit.php | 4 ++-- usr/local/www/interfaces_qinq_edit.php | 4 ++-- usr/local/www/services_igmpproxy_edit.php | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/etc/inc/easyrule.inc b/etc/inc/easyrule.inc index 0679060..c62f76b 100644 --- a/etc/inc/easyrule.inc +++ b/etc/inc/easyrule.inc @@ -166,7 +166,7 @@ function easyrule_block_alias_add($host, $int = 'wan') { /* Create a new alias with all the proper information */ $alias['name'] = $blockaliasname . strtoupper($int); $alias['type'] = 'network'; - $alias['descr'] = mb_convert_encoding("Hosts blocked from Firewall Log view","HTML-ENTITIES","auto"); + $alias['descr'] = "Hosts blocked from Firewall Log view"; $alias['address'] = $host . '/32'; $alias['detail'] = 'Entry added ' . date('r') . '||'; diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index 74f7f03..d03c8a4 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -284,7 +284,7 @@ if ($_POST) { if (!$input_errors) { $alias['address'] = is_array($address) ? implode(" ", $address) : $address; - $alias['descr'] = mb_convert_encoding($_POST['descr'],"HTML-ENTITIES","auto"); + $alias['descr'] = $_POST['descr']; $alias['type'] = $_POST['type']; $alias['detail'] = implode("||", $final_address_details); @@ -342,7 +342,7 @@ if ($_POST) { else { $pconfig['name'] = $_POST['name']; - $pconfig['descr'] = mb_convert_encoding($_POST['descr'],"HTML-ENTITIES","auto"); + $pconfig['descr'] = $_POST['descr']; $pconfig['address'] = implode(" ", $address); $pconfig['type'] = $_POST['type']; $pconfig['detail'] = implode("||", $final_address_details); diff --git a/usr/local/www/interfaces_groups_edit.php b/usr/local/www/interfaces_groups_edit.php index 253be67..2c193f6 100755 --- a/usr/local/www/interfaces_groups_edit.php +++ b/usr/local/www/interfaces_groups_edit.php @@ -93,7 +93,7 @@ if ($_POST) { if (!$input_errors) { $ifgroupentry = array(); $ifgroupentry['members'] = $members; - $ifgroupentry['descr'] = mb_convert_encoding($_POST['descr'],"HTML-ENTITIES","auto"); + $ifgroupentry['descr'] = $_POST['descr']; if (isset($id) && $a_ifgroups[$id] && $_POST['ifname'] != $a_ifgroups[$id]['ifname']) { if (!empty($config['filter']) && is_array($config['filter']['rule'])) { @@ -156,7 +156,7 @@ if ($_POST) { header("Location: interfaces_groups.php"); exit; } else { - $pconfig['descr'] = mb_convert_encoding($_POST['descr'],"HTML-ENTITIES","auto"); + $pconfig['descr'] = $_POST['descr']; $pconfig['members'] = $members; } } diff --git a/usr/local/www/interfaces_qinq_edit.php b/usr/local/www/interfaces_qinq_edit.php index e8b698e..2ffbac9 100755 --- a/usr/local/www/interfaces_qinq_edit.php +++ b/usr/local/www/interfaces_qinq_edit.php @@ -142,7 +142,7 @@ if ($_POST) { if (!$input_errors) { $qinqentry['members'] = $members; - $qinqentry['descr'] = mb_convert_encoding($_POST['descr'],"HTML-ENTITIES","auto"); + $qinqentry['descr'] = $_POST['descr']; $qinqentry['vlanif'] = "{$_POST['if']}_{$_POST['tag']}"; $nmembers = explode(" ", $members); @@ -200,7 +200,7 @@ if ($_POST) { header("Location: interfaces_qinq.php"); exit; } else { - $pconfig['descr'] = mb_convert_encoding($_POST['descr'],"HTML-ENTITIES","auto"); + $pconfig['descr'] = $_POST['descr']; $pconfig['tag'] = $_POST['tag']; $pconfig['members'] = $members; } diff --git a/usr/local/www/services_igmpproxy_edit.php b/usr/local/www/services_igmpproxy_edit.php index 63cb10e..8d02173 100755 --- a/usr/local/www/services_igmpproxy_edit.php +++ b/usr/local/www/services_igmpproxy_edit.php @@ -98,7 +98,7 @@ if ($_POST) { if (!$input_errors) { $igmpentry['address'] = $address; - $igmpentry['descr'] = mb_convert_encoding($_POST['descr'],"HTML-ENTITIES","auto"); + $igmpentry['descr'] = $_POST['descr']; if (isset($id) && $a_igmpproxy[$id]) $a_igmpproxy[$id] = $igmpentry; @@ -114,7 +114,7 @@ if ($_POST) { //we received input errors, copy data to prevent retype else { - $pconfig['descr'] = mb_convert_encoding($_POST['descr'],"HTML-ENTITIES","auto"); + $pconfig['descr'] = $_POST['descr']; $pconfig['address'] = $address; $pconfig['type'] = $_POST['type']; } -- cgit v1.1