mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
Firewall: add model for categories. work in progress for https://github.com/opnsense/core/issues/4587
escape category option values.
This commit is contained in:
parent
8cd475cbde
commit
b00902e46c
@ -1217,8 +1217,9 @@ include("head.inc");
|
||||
<td>
|
||||
<select name="category[]" id="category" multiple="multiple" class="tokenize" data-allownew="true" data-sortable="false" data-width="334px" data-live-search="true">
|
||||
<?php
|
||||
foreach ((new OPNsense\Firewall\Category())->iterateCategories() as $category):?>
|
||||
<option value="<?=$category['name'];?>" <?=in_array($category['name'], $pconfig['category']) ? 'selected="selected"' : '';?> ><?=$category['name'];?></option>
|
||||
foreach ((new OPNsense\Firewall\Category())->iterateCategories() as $category):
|
||||
$catname = htmlspecialchars($category['name'], ENT_QUOTES | ENT_HTML401);?>
|
||||
<option value="<?=$catname;?>" <?=in_array($catname, $pconfig['category']) ? 'selected="selected"' : '';?> ><?=$catname;?></option>
|
||||
<?php
|
||||
endforeach;?>
|
||||
</select>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user