diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index 7029c293aa..10aa64710a 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -40,15 +40,16 @@ $icmptypes4 = array('any' => gettext('any')); $icmptypes6 = array('any' => gettext('any')); $icmptypes46 = array('any' => gettext('any')); +// ICMP descriptions may be translated, so require escaping to handle single quotes (in particular) foreach ($icmptypes as $k => $v) { if ($v['valid4']) { - $icmptypes4[$k] = $v['descrip']; + $icmptypes4[$k] = addslashes($v['descrip']); if ($v['valid6']) { - $icmptypes6[$k] = $v['descrip']; - $icmptypes46[$k] = $v['descrip']; + $icmptypes6[$k] = addslashes($v['descrip']); + $icmptypes46[$k] = addslashes($v['descrip']); } } else { - $icmptypes6[$k] = $v['descrip']; + $icmptypes6[$k] = addslashes($v['descrip']); } }