mirror of
https://github.com/lucaspalomodevelop/opnsense-core.git
synced 2026-03-13 00:07:27 +00:00
interfaces: allow literal comma by escape sequence '\,'; closes #8503
This commit is contained in:
parent
ce2abde150
commit
0a33697a90
@ -3325,9 +3325,9 @@ function DHCP_Config_File_Advanced($interface, $wancfg, $wanif)
|
||||
|
||||
$option_modifiers = "";
|
||||
if ($wancfg['adv_dhcp_option_modifiers'] != '') {
|
||||
$modifiers = preg_split('/\s*,\s*(?=(?:[^"]*"[^"]*")*[^"]*$)/', $wancfg['adv_dhcp_option_modifiers']);
|
||||
$modifiers = preg_split('/\s*(?<!\\\),\s*(?=(?:[^"]*"[^"]*")*[^"]*$)/', $wancfg['adv_dhcp_option_modifiers']);
|
||||
foreach ($modifiers as $modifier) {
|
||||
$option_modifiers .= "\t" . $modifier . ";\n";
|
||||
$option_modifiers .= "\t" . str_replace('\,', ',', $modifier) . ";\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user